-
-
Notifications
You must be signed in to change notification settings - Fork 221
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
Exception method does not set exc_info #130
Comments
Does that make sense to you? |
I see, but it still doesn't quite make sense; why does |
Yes, adding all the stdlib logger names to PrintLogger was probably a bad call in hindsight since – as you point out – it suggests functionality that’s not present at all. |
So it is how it is, and removing the method can't be done without potentially breaking client code. Moving forward and making the method conform to the stdlib logger doesn't make sense either since, as you said, properly configuring structlog with stdlib.BoundLogger fixes the behaviour. Closing the issue. |
.exception()
does not setexc_info=True
when used with the default configuration, causing the exception not to be logged. Explicitly addingexc_info=True
to the call toexception()
does add the info. This seems to have to do withBoundLoggerLazyProxy
not having a dedicatedexception()
proxy that setsexc_info
.Reproduction sample:
The text was updated successfully, but these errors were encountered: