Am Thu, 29 Jun 2006 20:22:28 -0700 schrieb ss2003:
> hi
> i have defined a function
> def logger(logfile,msg):
> import logging
>
> logging.basicConfig(level=logging.DEBUG,
>format='%(asctime)s %(levelname)-8s
> %(message)s',
>
> 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?
Loggers are different to handlers. Loggers map to areas of the
application, handlers map to output destinations. Loggers form a
hierarchy based on names
Ok, so I've figured this out (see below),
mail = logging.handlers.SMTPHandler('mail.vw.com',
'[EMAIL PROTECTED]',
'[EMAIL PROTECTED]',
'Data Processing Error at
location: %s' %