-
Notifications
You must be signed in to change notification settings - Fork 105
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
replace logrus with log/slog from stdlib #55
Conversation
@perbu Looking into this right now. Thanks for this upfront! |
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.
Thank you for this amazing PR. Just one minor thing that could be very helpful, is to add some documentation in the README about on how to use the logger maybe?
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.
requested changes done.
Hmm. How do I tell github that I did what you asked? 😕 |
IDK :) |
For some reason its not willing to pass the build system, due to some slog package shenanigans. Would be cool if you could look into that. |
@anthdm I don't see any problems with the CI anymore. I've bumped the GH action to use 1.20, that was the ticket. |
The default now is not to log anything.
So, if the application needs logging, it wouldn't do this:
but rather
for the default logging (which can be changed)
or for more control:
Since slog is so versatile this should be good enough for anybody.
No big semantic changes. I did remove the log.Fatal and log.Panic-level and replaces these with panics.
Removes uses of the log package from the examples, they shouldn't be using the library for logging, but rather log directly with log or slog.
Note that one test is failing, it was failing before as well.
Overall, I like the package. God job.
Closes: #54