-
Notifications
You must be signed in to change notification settings - Fork 291
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
streamline logging #844
Merged
Merged
streamline logging #844
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
github-actions
bot
added
area/api v0
Affects the v0 API
area/api v1
Affects the v1 API
area/CLI
Affects the command line
area/dashboard
Affects the dashboard
area/datastore
Affects the storage system
area/dependencies
Affects dependencies
area/dispatch
Affects dispatching of requests
area/tooling
Affects the dev or user toolchain (e.g. tests, ci, build tools)
labels
Sep 26, 2022
vroldanbet
force-pushed
the
logging-improvements
branch
4 times, most recently
from
September 27, 2022 10:35
4c1c3ee
to
a27f236
Compare
vroldanbet
force-pushed
the
logging-improvements
branch
4 times, most recently
from
October 4, 2022 08:19
8e5bec8
to
7750ef2
Compare
vroldanbet
force-pushed
the
logging-improvements
branch
from
October 4, 2022 08:22
7750ef2
to
44bd3f9
Compare
vroldanbet
force-pushed
the
logging-improvements
branch
from
October 4, 2022 09:05
44bd3f9
to
2900f1a
Compare
jzelinskie
requested changes
Oct 5, 2022
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Only minor nitpicks
vroldanbet
force-pushed
the
logging-improvements
branch
from
October 5, 2022 18:09
2900f1a
to
2f01c07
Compare
- migrates to cobrautil v2 - configures logger to be non-blocking - configures same logger for OTel library - logging is now disabled by default in our tests - adds missing call to Close() in download server
vroldanbet
force-pushed
the
logging-improvements
branch
from
October 5, 2022 18:14
2f01c07
to
c5c8b26
Compare
- remove warning in favour of key-value - add missing message when serving http plain-text - align message wording - change "prefix" with "service" in log messages - log error stopping HTTP server as error, not warn - incorrect error message "failed while serving http", it was unclear if it was http or https
vroldanbet
force-pushed
the
logging-improvements
branch
from
October 5, 2022 18:19
c5c8b26
to
c354661
Compare
jzelinskie
approved these changes
Oct 5, 2022
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Labels
area/api v0
Affects the v0 API
area/api v1
Affects the v1 API
area/CLI
Affects the command line
area/dashboard
Affects the dashboard
area/datastore
Affects the storage system
area/dependencies
Affects dependencies
area/dispatch
Affects dispatching of requests
area/tooling
Affects the dev or user toolchain (e.g. tests, ci, build tools)
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Part of #753
Built on top of jzelinskie/cobrautil#19
What
Adjustments to homogenize and streamline how logging is used in SpiceDB.
How
Not all logging messages have been revisited. That will be tackled in a follow up. This PR sets the foundation.
zerolog.SetGlobalLevel(zerolog.Disabled)
in each test)zerolog.Ctx()
is used in the codebase frequently, but because we don't set the default logger for contet-based logging. We are now settingzerolog.DefaultContextLogger
whenever our own global logger is set.The changeset is relatively simple, it's just that lots of imports had to be adjusted. Files to look into are:
Example startup at
INFO
levelExample startup at
DEBUG
level