-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
Add WithOptions() for SugaredLogger #1072
Labels
Comments
Hey @e-nikolov! |
Happy to give this a shot if that is okay? |
Oops, I missed this @craigpastro. Sure! Feel free to create a PR for this. |
Thanks! Created a PR. |
abhinav
pushed a commit
that referenced
this issue
Apr 8, 2022
Add a WithOptions method to SugaredLogger that allows specifying building a copy of the logger with the specified options applied. This allows turning, slog.Desugar().WithOptions(...).Sugar() Into, slog.WithOptions(...) Closes #1072
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Currently there is WithOptions() only for unsugared loggers, so Desugar() and then Sugar() needs to be called in order to add options to a SugaredLogger.
The text was updated successfully, but these errors were encountered: