Skip to content

Instantly share code, notes, and snippets.

@shaardie
Last active March 16, 2017 13:41
Show Gist options
  • Save shaardie/3e45b985fc52481184e7179f007e2051 to your computer and use it in GitHub Desktop.
Save shaardie/3e45b985fc52481184e7179f007e2051 to your computer and use it in GitHub Desktop.
Simple python system logger example
import logging
import logging.handlers
handler = logging.handlers.SysLogHandler(address='/dev/log')
logger = logging.getLogger('')
logger.addHandler(handler)
logger.setLevel(logging.DEBUG)
import logging
logger = logging.getLogger(__name__)
logger.info("BANANA")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment