[issue37258] Logging cache not cleared properly when setting level
Vinay Sajip
report at bugs.python.org
Wed Jun 19 06:12:42 EDT 2019
Vinay Sajip <vinay_sajip at yahoo.co.uk> added the comment:
This is not actually a bug, but happens because the logger is instantiated directly, rather than through logging.getLogger(...). Because of the direct instantiation, the logger cache isn't tracked via setLevel() - because the logger doesn't end up in logging.manager.loggerDict.
However, I will incorporate Karthikeyan's test (modified to avoid direct instantiation), and update the documentation to strengthen the information to avoid direct instantiation of loggers.
----------
resolution: -> not a bug
_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue37258>
_______________________________________
More information about the Python-bugs-list
mailing list