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

log: Include configured fields in all logs #3136

Merged
merged 1 commit into from Mar 2, 2021

Conversation

adamwg
Copy link
Contributor

@adamwg adamwg commented Mar 31, 2020

It's possible to configure log fields in the configuration file, and we would like these fields to be included in all logs. Previously these fields were included only in logs produced using the main routine's context, meaning that any logs from a request handler were missing the fields since those use a context based on the HTTP request's context.

Add a configurable default logger to the context package, and set it when configuring logging at startup time.

Signed-off-by: Adam Wolfe Gordon awg@digitalocean.com

Copy link
Contributor

@waynr waynr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:shipit:

Base automatically changed from master to main January 27, 2021 15:51
@milosgajdos
Copy link
Member

Can you rebase @adamwg, please?

It's possible to configure log fields in the configuration file, and we would
like these fields to be included in all logs. Previously these fields were
included only in logs produced using the main routine's context, meaning that
any logs from a request handler were missing the fields since those use a
context based on the HTTP request's context.

Add a configurable default logger to the `context` package, and set it when
configuring logging at startup time.

Signed-off-by: Adam Wolfe Gordon <awg@digitalocean.com>
@adamwg
Copy link
Contributor Author

adamwg commented Mar 1, 2021

@milosgajdos done!

@milosgajdos milosgajdos merged commit a52b8d8 into distribution:main Mar 2, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants