-
Notifications
You must be signed in to change notification settings - Fork 5
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
feat(slogger): Improve logging #234
base: dev
Are you sure you want to change the base?
Conversation
51f94bf
to
a945798
Compare
a945798
to
2932942
Compare
9d684f8
to
88f7ef1
Compare
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.
The change is very good. Please see my suggestions.
88f7ef1
to
874251a
Compare
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.
LGTM.
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.
LGTM.
This for example allows using environment variables to set logging levels.
This is to allow other libraries that don't link to common to use it (e.g slogger)
Previously, it wasn't possible to setup specific log levels. You had had to start with -d (debug) mode to get debug messages. This commit introduces adding specifc log levels using either LOG_LEVEL in config file, or using SAUNAFS_LOG_LEVEL from the environment It also fixes -d always setting the level to debug, which is what you may not want if you want the process to run in the foreground.
* Change most current debugs to the lower trace level * Change magic file log to trace level * Fix tests to use this new level
* Print system error messages instead of ignoring them
874251a
to
c3c8d49
Compare
These commits aim to improve the logging capabilities, and allow more fine-grained control of it. It also removes the -d option spamming worthless debug messages (by lowering them to trace, and using the config file to determine the logging level).