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 string interpolation to FilteringBoundLogger #454

Merged
merged 5 commits into from
Oct 10, 2022

Conversation

hynek
Copy link
Owner

@hynek hynek commented Oct 7, 2022

This adds string interpolation to FilteringBoundLogger for users who want more human-friendly log messages and improves stdlib drop-in compat:

>>> log.info("Hello %s! The answer is %d.", "World", 42, x=1)
2022-10-07 10:04.31 [info     ] Hello World! The answer is 42. x=1

Hopefully fixes #439

@hynek hynek force-pushed the add-interpolation-default-logger branch 3 times, most recently from 35fd80c to 974b0ce Compare October 7, 2022 13:49
@hynek hynek force-pushed the add-interpolation-default-logger branch 2 times, most recently from 5505348 to 33a3d2a Compare October 7, 2022 15:07
@hynek hynek force-pushed the add-interpolation-default-logger branch from 33a3d2a to b3a45b4 Compare October 7, 2022 17:01
@hynek hynek enabled auto-merge (squash) October 10, 2022 05:21
@hynek hynek merged commit 0341298 into main Oct 10, 2022
@hynek hynek deleted the add-interpolation-default-logger branch October 10, 2022 05:24
TeoZosa added a commit to TeoZosa/structlog-sentry-logger that referenced this pull request Nov 21, 2022
Raw UUID logging is no longer supported as of structlog `22.2.0`
- Merged in hynek/structlog#454
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.

Cannot use PositionalArgumentsFormatter with FilteringBoundLogger
1 participant