Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Python > logging module, multiple handlers

Reply
Thread Tools

logging module, multiple handlers

 
 
bneron@gmail.com
Guest
Posts: n/a
 
      03-29-2006
hello,

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?

Thanks in advance!

bertrand

 
Reply With Quote
 
 
 
 
Vinay Sajip
Guest
Posts: n/a
 
      03-29-2006
http://www.velocityreviews.com/forums/(E-Mail Removed) 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

http://docs.python.org/lib/logging-c...ileformat.html

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
file."

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

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Logging: how to suppress default output when adding handlers? Chris Shenton Python 3 06-05-2007 10:13 PM
does logging.config support extension handlers? j vickroy Python 1 09-07-2004 08:50 PM
Logging with multiple loggers/handlers Jeff Shannon Python 3 08-07-2004 02:46 AM
Logging with no handlers configured Vinay Sajip Python 0 07-21-2004 09:40 PM
logging module: problem with custom handlers Andreas Jung Python 3 10-28-2003 12:54 PM



Advertisments