-
Notifications
You must be signed in to change notification settings - Fork 308
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
Improve logging of bare exceptions and other cleanups. #922
Conversation
Thanks for submitting your first pull request! You are awesome! 🤗 |
This change finds a few places where `log.[somelevel](some_exc)` was called and rewrites them to provide more information. Also updates other logging statements in the same files to use logging best practices (always put a static message in the first parameter, only substitute variables in with `%` expressions).
Codecov Report
@@ Coverage Diff @@
## main #922 +/- ##
==========================================
- Coverage 72.29% 72.29% -0.01%
==========================================
Files 65 65
Lines 7978 7976 -2
Branches 1332 1332
==========================================
- Hits 5768 5766 -2
Misses 1804 1804
Partials 406 406
Continue to review full report at Codecov.
|
Interesting. I had no idea that this was considered a best practice for optimization (documentation to prove it!) |
@meeseeksdev please backport to 1.x |
Owee, I'm MrMeeseeks, Look at me. There seem to be a conflict, please backport manually. Here are approximate instructions:
And apply the correct labels and milestones. Congratulations — you did some good work! Hopefully your backport PR will be tested by the continuous integration and merged soon! Remember to remove the If these instructions are inaccurate, feel free to suggest an improvement. |
It’s also, strictly speaking, a correctness issue—if you have message_contents = "60%savory"
log.info(f"this beef is {message_contents}") then the string that’s passed in will be:
but there's nothing to substitute in for the |
This change finds a few places where
log.[somelevel](some_exc)
was called and rewrites them to provide more information. Also updates
other logging statements in the same files to use logging best practices
(always put a static message in the first parameter, only substitute
variables in with
%
expressions).