Skip to content

Instantly share code, notes, and snippets.

@phaustin
Last active August 29, 2015 14:15
Show Gist options
  • Select an option

  • Save phaustin/f17a08218be11873a00d to your computer and use it in GitHub Desktop.

Select an option

Save phaustin/f17a08218be11873a00d to your computer and use it in GitHub Desktop.
logging
import logging
logging.basicConfig()
my_log=logging.getLogger('my_logger')
my_log.setLevel(logging.WARN)
my_log.propagate=True
my_log.propagate=False
try:
int('A')
except Exception as ex:
my_log.exception(ex)
my_log.info(len(raw_lines))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment