Created
November 5, 2015 21:48
-
-
Save litnimax/518a4025995d5fcd9019 to your computer and use it in GitHub Desktop.
logger intro
This file contains hidden or 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
| logger = logging.getLogger(__name__) | |
| ch = logging.StreamHandler() | |
| ch.setLevel(logging.DEBUG) | |
| formatter = logging.Formatter('%(asctime)s - %(name)s - %(levelname)s - %(message)s') | |
| ch.setFormatter(formatter) | |
| logger.addHandler(ch) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment