Skip to content

Instantly share code, notes, and snippets.

@ryandotclair
Last active October 31, 2015 08:24
Show Gist options
  • Save ryandotclair/7c44124a2bf68ed9c6d6 to your computer and use it in GitHub Desktop.
Save ryandotclair/7c44124a2bf68ed9c6d6 to your computer and use it in GitHub Desktop.
logging
logging.basicConfig(
level=logging.getLevelName('DEBUG'),
format='%(asctime)s %(name)-12s %(levelname)-8s %(message)s',
filename='SRDFA_Reporter_Error.log')
console_write = logging.StreamHandler()
console_write.setLevel(logging.getLevelName('INFO'))
logger = logging.getLogger()
logger.addHandler(console_write)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment