help with logging - specifically LogRecord and record

P

Pete Jereb

toaddrs = ('(e-mail address removed)', '(e-mail address removed)', '(e-mail address removed)')
logger = logging.getLogger("mine")
hdlr = logging.handlers.SMTPHandler('xyz.com', '(e-mail address removed)', 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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,733
Messages
2,569,440
Members
44,830
Latest member
ZADIva7383

Latest Threads

Top