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

Idea: Attach Logger to Context #2096

Closed
lukedirtwalker opened this issue Nov 7, 2018 · 0 comments
Closed

Idea: Attach Logger to Context #2096

lukedirtwalker opened this issue Nov 7, 2018 · 0 comments
Assignees

Comments

@lukedirtwalker
Copy link
Collaborator

So we can create a logger per request attach it to the context and libraries can use the logger.
With a convenience method like log.LoggerFromContext(ctx) libraries get the logger from the context or the default logger if none is attached. This way all log statements for a handler can be matched via a unique ID.

@scrye scrye self-assigned this Nov 7, 2018
@scrye scrye closed this as completed in b310d6c Nov 8, 2018
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

No branches or pull requests

2 participants