Skip to content

Instantly share code, notes, and snippets.

@harryjubb
Created July 29, 2019 16:38
Show Gist options
  • Save harryjubb/d25fe5884cc9a95ee3e705883601dc4c to your computer and use it in GitHub Desktop.
Save harryjubb/d25fe5884cc9a95ee3e705883601dc4c to your computer and use it in GitHub Desktop.
LOGGING = {
'version': 1,
'disable_existing_loggers': False,
# 'filters': {
# 'require_debug_false': {
# '()': 'django.utils.log.RequireDebugFalse'
# }
# },
'handlers': {
# 'mail_admins': {
# 'level': 'ERROR',
# 'filters': ['require_debug_false'],
# 'class': 'django.utils.log.AdminEmailHandler'
# },
'console': {
'level': 'DEBUG',
'class': 'logging.StreamHandler',
}
},
'loggers':
{
# 'django.request': {
# 'handlers': ['mail_admins'],
# 'level': 'ERROR',
# 'propagate': True,
# },
# Uncommenting this logs SQL as it is executed
'django.db.backends': {
'handlers': ['console'],
'level': 'DEBUG'
},
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment