Enable django toolbar logging
This commit is contained in:
parent
2478f5de58
commit
edc517c671
1 changed files with 8 additions and 2 deletions
|
@ -278,6 +278,7 @@ DEBUG_TOOLBAR_CONFIG = {
|
||||||
'SHOW_TOOLBAR_CALLBACK': lambda x: DEBUG,
|
'SHOW_TOOLBAR_CALLBACK': lambda x: DEBUG,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
from debug_toolbar.panels.logging import collector
|
||||||
LOGGING = {
|
LOGGING = {
|
||||||
'version': 1,
|
'version': 1,
|
||||||
'disable_existing_loggers': False,
|
'disable_existing_loggers': False,
|
||||||
|
@ -305,7 +306,12 @@ LOGGING = {
|
||||||
'filters': ['require_debug_false'],
|
'filters': ['require_debug_false'],
|
||||||
'class': 'django.utils.log.AdminEmailHandler',
|
'class': 'django.utils.log.AdminEmailHandler',
|
||||||
'include_html': True,
|
'include_html': True,
|
||||||
}
|
},
|
||||||
|
'djdt_log': {
|
||||||
|
'level': 'DEBUG',
|
||||||
|
'class': 'debug_toolbar.panels.logging.ThreadTrackingHandler',
|
||||||
|
'collector': collector,
|
||||||
|
},
|
||||||
},
|
},
|
||||||
'loggers': {
|
'loggers': {
|
||||||
'django.request': {
|
'django.request': {
|
||||||
|
@ -320,7 +326,7 @@ LOGGING = {
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
'root': {
|
'root': {
|
||||||
'handlers': ['console'],
|
'handlers': ['console', 'djdt_log'],
|
||||||
'level': 'DEBUG'
|
'level': 'DEBUG'
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue