Browse files

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.
  • Loading branch information...
1 parent f0f327b commit 10e505b1b37f29c9ac6567134c48677b042c2a87 @claudep claudep committed Sep 29, 2012
Showing with 1 addition and 1 deletion.
  1. +1 −1 django/utils/log.py
View
2 django/utils/log.py
@@ -41,6 +41,7 @@ def emit(self, record):
'handlers': {
'console':{
'level': 'INFO',
+ 'filters': ['require_debug_true'],
'class': 'logging.StreamHandler',
},
'null': {
@@ -55,7 +56,6 @@ def emit(self, record):
'loggers': {
'django': {
'handlers': ['console'],
- 'filters': ['require_debug_true'],
},
'django.request': {
'handlers': ['mail_admins'],

0 comments on commit 10e505b

Please sign in to comment.