Mercurial > public > sg101
changeset 571:c2ba9c3395da
For Django 1.4, add a require_debug_false logging filter.
author | Brian Neal <bgneal@gmail.com> |
---|---|
date | Wed, 02 May 2012 20:43:16 -0500 |
parents | 0a0a069ab645 |
children | 368d731af479 |
files | gpp/settings/local.py gpp/settings/production.py |
diffstat | 2 files changed, 12 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/gpp/settings/local.py Wed May 02 20:38:17 2012 -0500 +++ b/gpp/settings/local.py Wed May 02 20:43:16 2012 -0500 @@ -43,6 +43,11 @@ 'format': '%(asctime)s %(levelname)s %(message)s' }, }, + 'filters': { + 'require_debug_false': { + '()': 'django.utils.log.RequireDebugFalse' + }, + }, 'handlers': { 'console': { 'class': 'logging.StreamHandler', @@ -62,6 +67,7 @@ 'class': 'django.utils.log.AdminEmailHandler', 'level': 'ERROR', 'formatter': 'simple', + 'filters': ['require_debug_false'], }, }, 'loggers': {
--- a/gpp/settings/production.py Wed May 02 20:38:17 2012 -0500 +++ b/gpp/settings/production.py Wed May 02 20:43:16 2012 -0500 @@ -55,6 +55,11 @@ 'format': '%(asctime)s %(levelname)s %(message)s' }, }, + 'filters': { + 'require_debug_false': { + '()': 'django.utils.log.RequireDebugFalse' + }, + }, 'handlers': { 'console': { 'class': 'logging.StreamHandler', @@ -74,6 +79,7 @@ 'class': 'django.utils.log.AdminEmailHandler', 'level': 'ERROR', 'formatter': 'simple', + 'filters': ['require_debug_false'], }, }, 'loggers': {