Skip to content

Instantly share code, notes, and snippets.

@trcook
Last active October 12, 2018 19:30
Show Gist options
  • Save trcook/59813191ba4bb664818ec30c276940ec to your computer and use it in GitHub Desktop.
Save trcook/59813191ba4bb664818ec30c276940ec to your computer and use it in GitHub Desktop.
LOGGING setup logging in python
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