-
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
chore: Improve main logging #238
Open
uristdwarf
wants to merge
11
commits into
dev
Choose a base branch
from
improve-main-logging
base: dev
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
+334
−108
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
lgsilva3087
previously approved these changes
Nov 14, 2024
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. Please see my comment.
uristdwarf
force-pushed
the
improve-main-logging
branch
3 times, most recently
from
November 29, 2024 07:59
7139894
to
ec2c53d
Compare
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
* Use strerr instead of strerror
Improve logging to better debug errors and where they occured, also use safs functions. Closes #221
Due to (for whatever reason on earth) main logging the output of the pid into stderr, any script expecting only this PID in stderr will break. This fixes it by exiting early after the PID has been acquired
ralcolea
force-pushed
the
improve-main-logging
branch
from
December 27, 2024 08:56
ec2c53d
to
80b37dd
Compare
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Improve logging to better debug errors and where they occured, also use safs functions.
Closes #221
[Only merge after #234]