Skip to content

Instantly share code, notes, and snippets.

@kerin
Created July 31, 2014 10:54
Show Gist options
  • Save kerin/2a8668ac6481d2548cf8 to your computer and use it in GitHub Desktop.
Save kerin/2a8668ac6481d2548cf8 to your computer and use it in GitHub Desktop.
from .testing import *
INSTALLED_APPS += ('django_extensions',)
LOGGING = {
'version': 1,
'disable_existing_loggers': False,
'formatters': {
'verbose': {
'format': '%(levelname)s %(asctime)s %(module)s %(process)d %(thread)d %(message)s'
},
'simple': {
'format': '%(levelname)s %(message)s'
},
},
'filters': {
'require_debug_false': {
'()': 'django.utils.log.RequireDebugFalse'
},
'require_debug_true': {
'()': 'django.utils.log.RequireDebugTrue'
}
},
'handlers': {
'mail_admins': {
'level': 'ERROR',
'class': 'django.utils.log.AdminEmailHandler'
},
'console':{
'level':'DEBUG',
'class':'logging.StreamHandler',
'formatter': 'verbose'
}
},
'loggers': {
'django.request': {
'handlers': ['mail_admins', 'console'],
'level': 'ERROR',
'propagate': True,
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment