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.
This commit is contained in:
parent
f0f327bbfe
commit
10e505b1b3
|
@ -41,6 +41,7 @@ DEFAULT_LOGGING = {
|
||||||
'handlers': {
|
'handlers': {
|
||||||
'console':{
|
'console':{
|
||||||
'level': 'INFO',
|
'level': 'INFO',
|
||||||
|
'filters': ['require_debug_true'],
|
||||||
'class': 'logging.StreamHandler',
|
'class': 'logging.StreamHandler',
|
||||||
},
|
},
|
||||||
'null': {
|
'null': {
|
||||||
|
@ -55,7 +56,6 @@ DEFAULT_LOGGING = {
|
||||||
'loggers': {
|
'loggers': {
|
||||||
'django': {
|
'django': {
|
||||||
'handlers': ['console'],
|
'handlers': ['console'],
|
||||||
'filters': ['require_debug_true'],
|
|
||||||
},
|
},
|
||||||
'django.request': {
|
'django.request': {
|
||||||
'handlers': ['mail_admins'],
|
'handlers': ['mail_admins'],
|
||||||
|
|
Loading…
Reference in New Issue