syslog

Multiline log records in syslog

Multiline log records in syslog Question: So I’ve configured my Python application to log to syslog with Python’s SysLogHandler, and everything works fine. Except for multi-line handling. Not that I need to emit multiline log records so badly (I do a little), but I need to be able to read Python’s exceptions. I’m using Ubuntu …

Total answers: 3

How to configure logging to syslog in Python?

How to configure logging to syslog in Python? Question: I can’t get my head around Python’s logging module. My needs are very simple: I just want to log everything to syslog. After reading documentation I came up with this simple test script: import logging import logging.handlers my_logger = logging.getLogger(‘MyLogger’) my_logger.setLevel(logging.DEBUG) handler = logging.handlers.SysLogHandler() my_logger.addHandler(handler) my_logger.debug(‘this …

Total answers: 12