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

Let user decide what to do if logger is not in context #177

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Let user decide what to do if logger is not in context #177

wants to merge 1 commit into from

Conversation

ghost
Copy link

@ghost ghost commented Aug 13, 2019

As for now disabledLogger is being returned if user tries to get logger from context.Context that has not logger within it.
Such a behaviour may be beneficial, but in other cases is harmful and non-intuitive.

As for now disabledLogger is being returned if user tries to get logger from context.Context.
Such a behaviour may be beneficial, but in other cases it will be harmful.
Giving user an option to return nil and fail with nil pointer error may prevent logs loss.
@mitar
Copy link
Contributor

mitar commented Feb 19, 2022

Isn't there already DefaultContextLogger?

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.

1 participant