[PATCH] Avoid string interpolation in logging calls
|Reported by:||Owned by:|
Replaced string interpolation in logging calls with function parameter format.
When using Python's stdlib logging it's better to delegate string formatting to the loggging package - rather than use %-interpolation directly. This saves a few CPU cycles when the configured log level would discard that log message. Instead of
self.log.debug("Sendmail command line: %s" % cmdline)
self.log.debug("Sendmail command line: %s", cmdline)
Attached is a patch to fix this in 0.12.x. If theres interest I can update for 1.0.x and trunk.
Change History (12)
comment:7 by , 6 years ago
|Release Notes:||modified (diff)|
|Status:||assigned → closed|