-
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
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.
874251a
to
c3c8d49
Compare
c3c8d49
to
8466e93
Compare
8466e93
to
8e36b11
Compare
This for example allows using environment variables to set logging levels. Signed-off-by: Urmas Rist <urmas@leil.io>
This is to allow other libraries that don't link to common to use it (e.g slogger) Signed-off-by: Urmas Rist <urmas@leil.io>
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. Signed-off-by: Urmas Rist <urmas@leil.io>
* Change most current debugs to the lower trace level * Change magic file log to trace level * Fix tests to use this new level Signed-off-by: Urmas Rist <urmas@leil.io>
Signed-off-by: Urmas Rist <urmas@leil.io>
Signed-off-by: Urmas Rist <urmas@leil.io>
* Print system error messages instead of ignoring them Signed-off-by: Urmas Rist <urmas@leil.io>
8e36b11
to
36fa2e8
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
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).