[issue28524] Set default argument of logging.disable() to logging.CRITICAL

Al Sweigart report at bugs.python.org
Sat Nov 5 22:19:04 EDT 2016


Al Sweigart added the comment:

Setting up different configurations for dev/prod is a bit more complicated than I'd like for most projects. I'd instead just call logging.disable(logging.CRITICAL).

The entire point of this is just for the convenience of being able to disable logging messages by calling logging.disable() instead of logging.disable(logging.CRITICAL).

It's a two-line change, backwards compatible, and (imo) a sensible default. You call logging.disable() expecting it to disable logging. You might want to disable a lower level, but as the Google search shows, most people just want to disable all logging period.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue28524>
_______________________________________


More information about the Python-bugs-list mailing list