Created
March 17, 2018 01:50
-
-
Save dpfrakes/4217a0a3afffe5db27d5f4b801d81b01 to your computer and use it in GitHub Desktop.
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
#!/bin/python | |
# http://docs.python-guide.org/en/latest/writing/logging/ | |
import logging | |
logger = logging.getLogger() | |
handler = logging.StreamHandler() | |
formatter = logging.Formatter( | |
'%(asctime)s %(name)-12s %(levelname)-8s %(message)s') | |
handler.setFormatter(formatter) | |
logger.addHandler(handler) | |
logger.setLevel(logging.DEBUG) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment