Skip to content

Instantly share code, notes, and snippets.

@rdowne
Created August 26, 2014 18:01
Show Gist options
  • Save rdowne/390fee358366c4c66af8 to your computer and use it in GitHub Desktop.
Save rdowne/390fee358366c4c66af8 to your computer and use it in GitHub Desktop.
import logging
from logging.handlers import SysLogHandler
l = SysLogHandler(address=('myhost.mydomain.com', 7099))
log = logging.getLogger('test')
ssf = logging.Formatter('%(name)s[%(process)d]: %(levelname)s %(message)s')
l.setFormatter(ssf)
log.error("Testing out")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment