Logging to different addressees

Vinay Sajip vinay_sajip at yahoo.co.uk
Wed Jul 16 15:38:56 CEST 2008


On Jul 16, 8:55 am, McA <andreas.m... at web.de> wrote:
> Thank you for that snippet. That means, that the root-logger does
> inherit
> EVERY message (if it fits to the level and isn't filtered) and the
> inheritage chain is build by the chosen logger names, e.g.
> messages tologging.getLogger('tree.leave') would also show up inlogging.getLogger('tree') automatically?

Yes.

> If this is true, how can I avoid this "bubbling up" if I would like
> to?
> (You see, that's a new question, but I want to take the chance to get
> the answers from you personally ;-)
>
> Hope not to bother.
>

Use the propagate flag, which is mentioned in the documentation. In
fact, please make sure you've reviewed all the documentation before
posting, as the documentation is intended to answer the more
straightforward and common questions which come up.

Best regards,

Vinay Sajip



More information about the Python-list mailing list