Skip to content

Instantly share code, notes, and snippets.

@fdemmer
Created September 9, 2015 18:45
Show Gist options
  • Save fdemmer/270eb6a73de5db5d1828 to your computer and use it in GitHub Desktop.
Save fdemmer/270eb6a73de5db5d1828 to your computer and use it in GitHub Desktop.
Configure basic logging for stdout in scripts or quick and dirty stuff...
import logging
import sys
logging.basicConfig(
stream=sys.stdout,
level=logging.DEBUG,
format='%(asctime)s %(levelname)s %(name)s %(funcName)s(%(lineno)d): %(message)s'
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment