[issue8327] unintuitive behaviour of logging message propagation

Pascal Chambon report at bugs.python.org
Wed Apr 7 10:05:48 CEST 2010


Pascal Chambon <chambon.pascal at gmail.com> added the comment:

Thanks for the doc patch, if you don't mind I'd just add the paragraph below too, to clarify the fact that logger levels are only "entry points" levels, ignored he rest of the time. There might be slight redundancies with the rest of the (long) documentation, but it's all benefit imo. B-)

"In addition to any handlers directly associated with a logger, *all handlers associated with all ancestors of the logger* are called to dispatch the message (unless the *propagate* flag for a logger is set to a false value, at which point the passing to ancestor handlers stops).

Note that in this process, the level of ancestor loggers is never considered : only their *propagate* attribute and the levels of their loggers canimpact the treatment on the message being dispatched. The level of a logger is thus only acting as an *entry point barrier*, only able to stop the whole dispatch of a message that enters the system through it."

----------

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


More information about the Python-bugs-list mailing list