-
Notifications
You must be signed in to change notification settings - Fork 105
GCI1066 [Team TREE][2025] - Logging format interpolation #404
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
base: main
Are you sure you want to change the base?
GCI1066 [Team TREE][2025] - Logging format interpolation #404
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.
Juste move the asciidoc file and this is good to me
| @@ -0,0 +1,51 @@ | |||
| When logging with formatted string, prefer using `%s` and logging kwargs which will be deferred until it cannot be avoided, instead of immediate `.format()` of `f""` interpolation. | |||
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.
Could you add a new test with codeCarbon to check these to uses cases :
- one use case where "debug" mode is enabled
- one use case where "debug" mode is disabled
|
This PR has been automatically marked as stale because it has no activity for 60 days. |
Added rule GCI1066: For logging format, prefer using
%swith kwargs instead of builtin formatter"".format()orf"", that way message formatting will be deferred until it cannot be avoided.References:
python doc about logging optimization
warning raised by pylint