Which is better way to enable/disable logging?
1) Changing log levels,
logging.disable(logging.CRITICAL)
2)
log = None
And logging messages this way,
if log:
log.info("log message")
So that we can avoid unnecessary string constructions in case of logging disabled...