Skip to content

Instantly share code, notes, and snippets.

@pikeas
Created June 18, 2015 16:52
Show Gist options
  • Save pikeas/99dc600274b6afeca8bf to your computer and use it in GitHub Desktop.
Save pikeas/99dc600274b6afeca8bf to your computer and use it in GitHub Desktop.
LOGGING_CONFIG = None
LOGGING = {
'version': 1,
'formatters': {
'long': {
'format': "%(asctime)s %(levelname)-8s %(module)s: %(message)s",
},
},
'handlers': {
'stderr': {
'class': 'logging.StreamHandler',
'formatter': 'long',
'level': 'DEBUG',
'stream': sys.stderr,
},
},
'loggers': {
'': {
'handlers': ['stderr'],
'level': env('LOG_LEVEL', 'INFO'),
},
}
}
logging.config.dictConfig(LOGGING)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment