[issue36318] Adding support for setting the "disabled" attribute of loggers from logging.config.dictConfig

Piotr Dobrogost report at bugs.python.org
Tue Oct 13 11:10:44 EDT 2020


Piotr Dobrogost <bugs.python.org at p.dobrogost.net> added the comment:

I strongly agree with arguments given by the original poster. Stackoverflow's questions cited show the functionality of disabling logger is something people are looking for.
Disabling logger by setting high enough level seems to be a workaround at best (sys.maxsize - 
 really?). More in the spirit of an on/off toggle is a filter blocking all records but this clearly feels like another workaround for something which should have been (and in fact already is, albeit unofficially) a simple boolean flag.
Not hiding "disabled" property behind underscore might have been a good thing after all. Making it official and supported by dictConfig() would remove clearly expressed pain point of users of the logging module.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue36318>
_______________________________________


More information about the Python-bugs-list mailing list