using the sysloghandler class
Nicholas Milkovits
nmilkovits at gmail.com
Wed Apr 18 18:42:03 EDT 2007
More information about the Python-list mailing list
Wed Apr 18 18:42:03 EDT 2007
- Previous message (by thread): Python Threads -
- Next message (by thread): using the sysloghandler class
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Hello all,
I have a small script which attempts to write to the user.log syslog
import logging, logging.handlers
logger = logging.getLogger('bender')
handler = logging.handlers.SysLogHandler(('localhost',
logging.handlers.SYSLOG_UDP_PORT),
logging.handlers.SysLogHandler.LOG_USER)
formatter = logging.Formatter('%(filename)s: %(levelname)s: %(message)s')
handler.setFormatter(formatter)
logger.addHandler(handler)
logger.error('what')
but no log entries show up, however if I use the syslog module as such:
>>> import syslog
>>> syslog.syslog('testing syslog')
everything works fine. I am not sure what I am doing wrong. Any help
would be appreciated.
Thanks,
Nick
- Previous message (by thread): Python Threads -
- Next message (by thread): using the sysloghandler class
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Python-list mailing list