Skip to content

Instantly share code, notes, and snippets.

@rewitt1
Created June 6, 2016 21:01
Show Gist options
  • Save rewitt1/d9f65ed0aa8eb43fb9157c923018315e to your computer and use it in GitHub Desktop.
Save rewitt1/d9f65ed0aa8eb43fb9157c923018315e to your computer and use it in GitHub Desktop.
logging class boilerplate
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