New submission from vladmihaisima <[email protected]>:
When invoking logging.config.dictConfig - if a logger was previously disabled
(for example by a call to "logging.config.dictConfig({'version': 1})") - the
loggers specified in the dictionary will not be enabled.
Documentation at https://docs.python.org/3/library/logging.config.html
specifies for disable_existing_loggers that "... behaviour is to disable any
existing non-root loggers unless they or their ancestors are explicitly named
in the logging configuration.". There is no explicit mention for what happens
when a logger exists and is already disabled. I would have assumed that if
present it will be enabled, but that does not seem to be the case.
So I think that if a logger is disabled invoking dictConfig cannot re-enable it.
See attached code for a reproducible case.
----------
files: bug.py
messages: 408216
nosy: vladmihaisima
priority: normal
severity: normal
status: open
title: logging.config.dictConfig with disable_existing_loggers set, also
disables loggers in configuration
versions: Python 3.10, Python 3.8, Python 3.9
Added file: https://bugs.python.org/file50486/bug.py
_______________________________________
Python tracker <[email protected]>
<https://bugs.python.org/issue46037>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com