Last active
October 12, 2018 19:30
-
-
Save trcook/59813191ba4bb664818ec30c276940ec to your computer and use it in GitHub Desktop.
LOGGING setup logging in python
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 | |
logging.basicConfig(format='|%(levelname)s| (%(name)s) %(lineno)d:> %(message)s',datefmt='%m/%d/%Y %H:%M:%S') | |
logger=logging.getLogger(name=__file__) | |
ld=logger.debug | |
li=logger.info | |
lw=logger.warning | |
logger.setLevel(logging.DEBUG) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment