handler = logging.handlers.SysLogHandler(address='/dev/log')
my_logger.addHandler(handler)
my_logger.debug('this is debug')
my_logger.critical('this is critical')
How to configure logging to syslog in python?