-
Notifications
You must be signed in to change notification settings - Fork 53
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 exception stack traces to logging #106
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Linter fails. Can you please have a look @plbertrand. Apart from that I think this looks great. Thanks |
1614ac9
to
0e76cd3
Compare
0e76cd3
to
9d51ecc
Compare
except ClientException as ce: | ||
logger.error("Client exception: %s" % ce) | ||
except ClientException: | ||
logger.error("Client exception", exc_info=True) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
logger.error("Client exception", exc_info=True) | |
logger.exception("Client exception") |
As you suggested in #105 the exception
shortcut is nice 👍 This could be an opportunity to move to it.
@plbertrand thanks for your contribution! Do you want to move to For some log statements, I wonder why we should include a traceback at all. For example when the connection aborts this is a network error - not a programming error. Some log levels also seem wrong to me. But both are out of scope of this MR. This is an improvement already as is! |
Fixes #105