logging module, multiple handlers

Vinay Sajip vinay_sajip at yahoo.co.uk
Wed Mar 29 19:44:55 CEST 2006

bneron at gmail.com wrote:

> I use the logging module include in Python 2.4 distribution, and I 'd
> like to have a logger witth several Handlers .
> I know how to do this by coding in python, but could I specify this
> directly in the logger configuration file?

See in


the text which says,

"The handlers entry is a comma-separated list of handler names, which
must appear in the [handlers] section. These names must appear in the
[handlers] section and have corresponding sections in the configuration

So...add multiple handler names in the "handlers" entry for a logger to
get those handlers added to the logger.

More information about the Python-list mailing list