I'll drop the standard bug report format because this is easy:
Instead of if debug then log, using the logging module would be more elegant.
The basic idea is that a different dict config could be loaded just once if debug is set, and logging would just discard any logs that are not at least the minimum level.
I'll drop the standard bug report format because this is easy:
Instead of
if debug then log
, using the logging module would be more elegant.The basic idea is that a different dict config could be loaded just once if debug is set, and logging would just discard any logs that are not at least the minimum level.