help with logging - specifically LogRecord and record

Pete Jereb petejereb at yahoo.com
Tue Oct 7 17:00:48 EDT 2003


toaddrs = ('bob at bob.com', 'joe at joe.com', 'moe at moe.com')
logger = logging.getLogger("mine")
hdlr = logging.handlers.SMTPHandler('xyz.com', 'abc at xyz.com', toaddrs,
'errorlog')
logger.addHandler(hdlr)
logger.info('Testing error logger')
hdlr.emit(?)

what should I have instead of a ? in the above line to make this (or
ANY .emit() work?  docs say a record, but I can't seem to locate this
mysterious record, other than a suspicion that it's part of class
LogRecord.  But I can't figure out how LogRecord ties into the above
statements.  Thanks, Pete.




More information about the Python-list mailing list