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

SafeSysLogHandler recreates the connection to a remote logging server when the connection is lost, avoiding the [errno 32] Broken Pipe error which would occur when using the SysLogHandler.


$ pip install safe_syslog_handler


If you have some simple logging configured, exemple:

from logging import config
    'version': 1,
    'disable_existing_loggers': False,
    'formatters': {
        'syslog': {
            'format': '%(asctime)s %(hostname)s %(name)s: #{filename:%(filename)s} #{line:%(lineno)d} #{process:%(process)d} #{thread:%(thread)d} %(message)s\n',
            'datefmt': '%b %d %H:%M:%S',
    'loggers': {
        'my-app': {
            'handlers': ['syslog_handlers', ],
            'level': logging.DEBUG,
            'propagate': True,

Then you just need to add this:

LOGGING['handlers'] = {
    'syslog_handlers': {
        'formatter': 'syslog',
        'class': 'safe_syslog_handler.handlers.SafeSysLogHandler',
        'socktype': socket.SOCK_STREAM,
        'address': ('localhost', 5140),

You can see an example app in the example folder


This package was created with Cookiecutter and the audreyr/cookiecutter-pypackage project template.

Release History

Release History


This version

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

Download Files

Download Files

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

File Name & Checksum SHA256 Checksum Help Version File Type Upload Date
safe_syslog_handler-0.1.0-py2.py3-none-any.whl (5.5 kB) Copy SHA256 Checksum SHA256 2.7 Wheel Jul 15, 2016
safe_syslog_handler-0.1.0.tar.gz (22.5 kB) Copy SHA256 Checksum SHA256 Source Jul 15, 2016

Supported By

WebFaction WebFaction Technical Writing 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 Rackspace Rackspace Cloud Servers DreamHost DreamHost Log Hosting