I'm using Python 3.4 on Mac OSX. I have the following code to setup a logger:
LOGGER = logging.getLogger(PROGRAM_NAME) LOGGER.setLevel(logging.DEBUG) LOGGER.propagate = False LOGGER_FH = logging.FileHandler(WORKING_DIR + "/syslog.log", 'a') LOGGER_FH.setLevel(logging.DEBUG) LOGGER_FH.setFormatter(logging.Formatter('%(name)s: [%(levelname)s] %(message)s')) LOGGER.addHandler(LOGGER_FH) LOGGER_SH = logging.handlers.SysLogHandler(address='/var/run/syslog', facility=logging.handlers.SysLogHandler.LOG_USER) LOGGER_SH.setLevel(logging.DEBUG) LOGGER_SH.setFormatter(logging.Formatter('%(name)s: [%(levelname)s] %(message)s')) LOGGER.addHandler(LOGGER_SH) The FileHandler works perfectly, and I'm able to see all expected messages at all logging levels show up in the log. The SysLogHandler doesn't work correctly. I'm unable to see any LOGGER.info() or LOGGER.debug() messages in the syslog output. I can see error and warning messages, but not info or debug. Even tweaking the /etc/syslog.conf file has no effect (even after explicitly reloading the syslog daemon with launchctl). What am I missing here ?