Piecing things together from here and other places, this is what I came up with that works on unbuntuubuntu 12.04 and centOS6
Create ana file in /etc/rsyslog.d/ that ends in .conf and add the following text
local6.* /var/log/my-logfile Restart rsyslog, reloading did NOT seem to work for the new log files. Maybe it only reloads existing conf files?
sudo restart rsyslog Then you can use this test program to make sure it actually works.
import logging, sys from logging import config LOGGING = { 'version': 1, 'disable_existing_loggers': False, 'formatters': { 'verbose': { 'format': '%(levelname)s %(module)s P%(process)d T%(thread)d %(message)s' }, }, 'handlers': { 'stdout': { 'class': 'logging.StreamHandler', 'stream': sys.stdout, 'formatter': 'verbose', }, 'sys-logger6': { 'class': 'logging.handlers.SysLogHandler', 'address': '/dev/log', 'facility': "local6", 'formatter': 'verbose', }, }, 'loggers': { 'my-logger': { 'handlers': ['sys-logger6','stdout'], 'level': logging.DEBUG, 'propagate': True, }, } } config.dictConfig(LOGGING) logger = logging.getLogger("my-logger") logger.debug("Debug") logger.info("Info") logger.warn("Warn") logger.error("Error") logger.critical("Critical")