Skip to content
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

Open
wants to merge 7 commits into
base: dev
Choose a base branch
from
Open

feat(slogger): Improve logging #234

wants to merge 7 commits into from

Conversation

uristdwarf
Copy link
Collaborator

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).

lgsilva3087
lgsilva3087 previously approved these changes Dec 3, 2024
Copy link
Contributor

@lgsilva3087 lgsilva3087 left a 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.

src/chunkserver/chunkserver-common/cmr_disk.cc Outdated Show resolved Hide resolved
src/chunkserver/hddspacemgr.cc Show resolved Hide resolved
src/master/filesystem_operations.cc Show resolved Hide resolved
src/master/matoclserv.cc Show resolved Hide resolved
src/slogger/slogger.cc Outdated Show resolved Hide resolved
Copy link
Collaborator

@rolysr rolysr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.

Copy link
Collaborator

@dmga44 dmga44 left a 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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants