-
Notifications
You must be signed in to change notification settings - Fork 35
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
fix(log): Expensive DEBUG log always run (#470) #471
Conversation
Don't run expensive JSON serialization for `DEBUG` logging unless that level would be printed/emitted. Fixes trim21#470
I don't see how this change could have caused the docs failure? |
not your fault |
transmission_rpc/client.py
Dismissed
@@ -275,7 +275,9 @@ | |||
"failed to parse response as json", method=method, argument=arguments, rawResponse=http_data | |||
) from error | |||
|
|||
self.logger.debug(json.dumps(data, indent=2)) | |||
if self.logger.isEnabledFor(logging.DEBUG): | |||
self.logger.debug(json.dumps(data, indent=2)) |
Check failure
Code scanning / CodeQL
Clear-text logging of sensitive information High
sensitive data (password)
This expression logs
sensitive data (password)
This expression logs
sensitive data (password)
This expression logs
sensitive data (password)
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.
Pre-existing issue, right?
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.
yes
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #471 +/- ##
==========================================
- Coverage 77.67% 77.62% -0.06%
==========================================
Files 14 14
Lines 1505 1506 +1
==========================================
Hits 1169 1169
- Misses 336 337 +1
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚨 Try these New Features:
|
Don't run expensive JSON serialization for
DEBUG
logging unless that level would be printed/emitted.Fixes #470