Removing default logging handler (causes duplicate logging)
galaviel at yahoo.com
Tue Mar 4 13:29:52 CET 2008
I want to add a logger to my application, then addHandler to it to log to a
Unfortunately when I use logging.getLogger("my_logger") to create the new
logger, it apparently comes with a default handler that logs to STDOUT (or
STDERR?). When I add my special handler it works Ok, but still logs to terminal,
which I do not want.
The only way I found to remove the default handler is by using
Is there a more elegant solution that uses the logging API?
my setup: Python 2.5.1 on Linux Suse 9.
P.S.I am not using Basic config, just 'import logging' and then regular
Thanks in advance,
More information about the Python-list