From 10e505b1b37f29c9ac6567134c48677b042c2a87 Mon Sep 17 00:00:00 2001 From: Claude Paroz Date: Sat, 29 Sep 2012 23:45:28 +0200 Subject: [PATCH] Moved filter at handler level Filters at logger level are only processed for messages directly logged to the specific logger, not for loggers in the parent chain. As the 'django' logger is almost always processed as an inherited logger, it makes more sense to filter messages at the 'console' handler level. --- django/utils/log.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/django/utils/log.py b/django/utils/log.py index 9e07961221..ea0122794b 100644 --- a/django/utils/log.py +++ b/django/utils/log.py @@ -41,6 +41,7 @@ DEFAULT_LOGGING = { 'handlers': { 'console':{ 'level': 'INFO', + 'filters': ['require_debug_true'], 'class': 'logging.StreamHandler', }, 'null': { @@ -55,7 +56,6 @@ DEFAULT_LOGGING = { 'loggers': { 'django': { 'handlers': ['console'], - 'filters': ['require_debug_true'], }, 'django.request': { 'handlers': ['mail_admins'],