Re: logging module question
- From: "chuck" <cmedcoff@xxxxxxxxx>
- Date: 23 Jan 2006 14:33:58 -0800
Ok, so I've figured this out (see below),
mail = logging.handlers.SMTPHandler('mail.vw.com',
'charles.medcoff@xxxxxxxxx',
'charles.medcoff@xxxxxxxxx',
'Data Processing Error at
location: %s' % "Chuck's Desk")
mail.setFormatter(logging.Formatter('%(asctime)s %(message)s'))
ml = logging.getLogger('mail')
ml.addHandler(mail)
ml.propagate = 0 ## <---------------do this to turn off
propagation of error reporting
but now I'd like to understand the design rational behind having each
logger in the object hierarchy log the same output by default. Anyone?
.
- Follow-Ups:
- Re: logging module question
- From: Vinay Sajip
- Re: logging module question
- References:
- logging module question
- From: chuck
- logging module question
- Prev by Date: Suggestions for workaround in CSV bug
- Next by Date: obtain client ip address from SimpleXMLRPCServer ?
- Previous by thread: logging module question
- Next by thread: Re: logging module question
- Index(es):
Relevant Pages
|