Created
June 6, 2016 21:01
-
-
Save rewitt1/d9f65ed0aa8eb43fb9157c923018315e to your computer and use it in GitHub Desktop.
logging class boilerplate
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 | |
ch = logging.StreamHandler() | |
formatter = logging.Formatter('%(levelname)s:%(message)s') | |
ch.setFormatter(formatter) | |
logger = logging.getLogger(__name__) | |
logger.addHandler(ch) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment