-
Notifications
You must be signed in to change notification settings - Fork 52
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
Fix logger initialization on readonly filesystems #2391
Fix logger initialization on readonly filesystems #2391
Conversation
Thanks for taking the initiative! Appreciate that! I didn't get deeply into it yet (holidays), but at first glance, it seems good, i thought also to look for a lazy appender solution. As long as it's not urgent to you guys I'll review it on Sunday. Let me know if it is. If you want in the meantime to add the implementation of error handling in write-only systems you are welcome to add it to the PR. For passing CI you need to sign your commits. |
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.
Nice!
Please apply linter suggestions to pass CI checks.
9ffdf46
to
3b61d8a
Compare
Calling RollingFileAppender::new tries to create the directory for the log files even though logging is turned off by Logger.init('off', null). This change simply postpones the initialization of RollingFileAppender until it is actually needed. This way if we do eg. Logger.init("info", null) it works as expected and does not throw an error on readonly filesystems. Fixes valkey-io#2387 Signed-off-by: Ville Nukarinen <[email protected]>
3b61d8a
to
5755de3
Compare
Signed the commit and amended all the requested changes. |
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, let me know if you want me to merge
ready on my side, so go ahead 😄 |
Calling RollingFileAppender::new tries to create the directory for the log files even though logging is turned off by Logger.init('off', null). This change simply postpones the initialization of RollingFileAppender until it is actually needed. This way if we do eg. Logger.init("info", null) it works as expected and does not throw an error on readonly filesystems.
Fixes #2387