This quick bugfix release fixes two regressions and the fact that RichTracebackFormatter has been ignoring its width argument the whole time.
Special Thanks
This release would not be possible without my generous sponsors! Thank you to all of you making sustainable maintenance possible! If you would like to join them, go to https://github.com/sponsors/hynek and check out the sweet perks!
Not to forget 6 more amazing humans who chose to be generous but anonymous!
Full Changelog
Fixed
The lazy logger proxy returned by structlog.get_logger() now returns its initial values when asked for context. When asked for context before binding for the first time, it returned an empty dictionary in 23.3.0.
The displayed level name when using structlog.stdlib.BoundLogger.exception() is "error" instead of "exception". Fixes regression in 23.3.0. #584
Don't ignore the width argument of RichTracebackFormatter. #587
This release would not be possible without my generous sponsors! Thank you to all of you making sustainable maintenance possible! If you would like to join them, go to https://github.com/sponsors/hynek and check out the sweet perks!
The lazy logger proxy returned by structlog.get_logger() now returns its initial values when asked for context.
When asked for context before binding for the first time, it returned an empty dictionary in 23.3.0.
The displayed level name when using structlog.stdlib.BoundLogger.exception() is "error" instead of "exception".
Fixes regression in 23.3.0.
#584
Don't ignore the width argument of RichTracebackFormatter.
#587
The colorful development logger is now even more configurable!
Choose freely your colors and the order of the key-value pairs!
Implement your own formatters for certain keys!
Implementing the output on top of the new columns API has changed the default very slightly, but shouldn't be noticeable.
#577
Async log methods (those starting with an a) now also support the collection of callsite information using structlog.processors.CallsiteParameterAdder.
#565
Changed
structlog.stdlib.recreate_defaults() now also adds structlog.stdlib.add_logger_name to the processors.
Check out the updated screenshot!
Fixed
The return value from get_logger() (a BoundLoggerLazyProxy) now passes isinstance-checks against structlog.typing.BindableLogger on Python 3.12.
#561
structlog.threadlocal.tmp_bind() now also works with BoundLoggerLazyProxy (in other words: before anything is bound to a bound logger).
stdlib: ProcessorFormatter can now be told to not render the log record message using getMessage and just str(record.msg) instead.
#550
stdlib: structlog.stdlib.BoundLogger.exception()'s handling ofLogRecord.exc_info is now set consistent with logging.
#571#572
You can trigger a rebase of this PR by commenting @dependabot rebase.
Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
- `@dependabot show ignore conditions` will show all of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
Note
Automatic rebases have been disabled on this pull request as it has been open for over 30 days.
Bumps structlog from 22.3.0 to 24.1.0.
Release notes
Sourced from structlog's releases.
... (truncated)
Changelog
Sourced from structlog's changelog.
... (truncated)
Commits
6f3fc33
Prepare 24.1.0d26d2ac
Give job a nameb5900c6
Fix CI coverage dependsf8eb4b9
Underlines are highlighting enough0b7da28
Display "exception" logs as level "error" (#586)ac37281
don't ignore the width parameter in RichTracebackFormatter (#587)813bc14
Return initial values from lazy logger proxy2ce0806
update rufff981c02
Build docs on 3.12d664dad
Get rid of period in step nameYou can trigger a rebase of this PR by commenting
@dependabot rebase
.Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot show