[issue30862] parent logger should also check the level

R. David Murray report at bugs.python.org
Thu Jul 6 00:20:00 EDT 2017


R. David Murray added the comment:

I will let Vinay answer definitively, but this is working as designed.  This allows you to set 'debug' level on a sub-logger without getting debug output for every logger in your system, which is what you would get otherwise as the default logging level is NOTSET.

The documentation for setLevel could probably be improved slightly in this regard, as currently you have to infer this behavior from the fact that NOTSET causes the ancestor logger's level to be used, implying that if you set it, that setting is used and not the ancestor logger's level.

----------
nosy: +r.david.murray

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


More information about the Python-bugs-list mailing list