vinay_sajip at yahoo.co.uk
Wed May 24 01:13:38 CEST 2006
Baurzhan Ismagulov wrote:
> Hello all,
> I want that each module has its own logger. I've defined the following
> config file:
> I want logger_root to go to /dev/null, so I've configured it with level
> CRITICAL. My understanding is that in this way debug messages are not
> printed on logger_root's handler. However, running the program results
> in the message being printed twice. What is the problem?
You've defined the handler against both the root logger and l01. You
only need it configured for the root logger - events passed to l01 will
be passed to all handlers up the hierarchy. So remove the
"handlers=console" line from [logger_l01] and it should print the
message just once.
More information about the Python-list