Skip to main content
This is a pre-production deployment of Warehouse. Changes made here affect the production instance of PyPI (
Help us improve Python packaging - Donate today!

Logging formatter which produces well-formatted RFC5424 Syslog Protocol messages

Project Description

This module implements a python `logging` formatter which produces well-formed RFC5424-compatible Syslog messages to a given socket.

[![Circle CI](](

## Usage

If you're configuring your loggers from code, you should use this formatter as below:

import logging
import logging.handlers
from syslog_rfc5424_formatter import RFC5424Formatter

def set_up_logging():
h = logging.handlers.SysLogHandler('/path/to/syslog_socket')

If you're using a more modern combination of a JSON/YAML config file and `logging.dictConfig`, your config file should look like the following (assuming YAML concrete syntax):

(): syslog_rfc5424_formatter.RFC5424Formatter

formatter: syslog
class: logging.handlers.SysLogHandler
address: "/path/to/syslog/socket"
facility: "ext://logging.handlers.SysLogHandler.LOG_USER"

level: INFO
- syslog

## License

This work is licensed under the ISC license, the text of which can be found at [LICENSE.txt](LICENSE.txt).

Release History

This version
History Node


Download Files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Filename, Size & Hash SHA256 Hash Help File Type Python Version Upload Date
(3.9 kB) Copy SHA256 Hash SHA256
Source None Mar 23, 2016

Supported By

Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Google Google Cloud Servers DreamHost DreamHost Log Hosting