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

Add optional default_extra param to formatter initializer. #12

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

matteo-zanoni
Copy link

This is used to specify extra parameters that are valid for all log messages formatted with the formatter. It is usefull to avoid repeting extra={...} in every log call.

Closes #11

This is used to specify extra parameters that are valid for all log
messages formatted with the formatter. It is usefull to avoid repeting
`extra={...}` in every log call.
@jteppinette
Copy link
Owner

@matteo-zanoni thank you for your pr. I will test it today, also I will update with tests and documentation before merge.

@matteo-zanoni
Copy link
Author

@jteppinette happy to help with any of those tasks... Just looking for some guidance I guess

The _old_ way described in the docs is now deprecated since the
`default_extra` parameter achieves the same outcome in a more clean and
explicit way.
@matteo-zanoni
Copy link
Author

@jteppinette I have updated the documentation and added simple tests for the new behaviour. Hoping this can be helpful

@matteo-zanoni
Copy link
Author

Hi @jteppinette have you been able to review this PR? Can I help with anything to get this merged and released?

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.

Enhancement: include extra fields in formatter
2 participants