help with logging - specifically LogRecord and record

Discussion in 'Python' started by Pete Jereb, Oct 7, 2003.

  1. Pete Jereb

    Pete Jereb Guest

    toaddrs = ('', '', '')
    logger = logging.getLogger("mine")
    hdlr = logging.handlers.SMTPHandler('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.
    Pete Jereb, Oct 7, 2003
    #1
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Chris Bedford
    Replies:
    1
    Views:
    6,888
    Chris Bedford
    Oct 6, 2003
  2. Rakesh Rajan via JavaKB.com

    Extending LogRecord

    Rakesh Rajan via JavaKB.com, Feb 28, 2005, in forum: Java
    Replies:
    0
    Views:
    450
    Rakesh Rajan via JavaKB.com
    Feb 28, 2005
  3. Takuya Murata

    Re: jdk1.4 LogRecord class

    Takuya Murata, Mar 26, 2005, in forum: Java
    Replies:
    0
    Views:
    394
    Takuya Murata
    Mar 26, 2005
  4. Replies:
    4
    Views:
    530
  5. Randy Kramer
    Replies:
    11
    Views:
    265
    Randy Kramer
    Mar 27, 2006
Loading...

Share This Page