Last active
March 16, 2017 13:41
-
-
Save shaardie/3e45b985fc52481184e7179f007e2051 to your computer and use it in GitHub Desktop.
Simple python system logger example
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import logging | |
import logging.handlers | |
handler = logging.handlers.SysLogHandler(address='/dev/log') | |
logger = logging.getLogger('') | |
logger.addHandler(handler) | |
logger.setLevel(logging.DEBUG) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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