Enable django toolbar logging

This commit is contained in:
Joel Addison 2019-10-02 23:26:13 +10:00
parent 2478f5de58
commit edc517c671

View file

@ -278,6 +278,7 @@ DEBUG_TOOLBAR_CONFIG = {
'SHOW_TOOLBAR_CALLBACK': lambda x: DEBUG,
}
from debug_toolbar.panels.logging import collector
LOGGING = {
'version': 1,
'disable_existing_loggers': False,
@ -305,7 +306,12 @@ LOGGING = {
'filters': ['require_debug_false'],
'class': 'django.utils.log.AdminEmailHandler',
'include_html': True,
}
},
'djdt_log': {
'level': 'DEBUG',
'class': 'debug_toolbar.panels.logging.ThreadTrackingHandler',
'collector': collector,
},
},
'loggers': {
'django.request': {
@ -320,7 +326,7 @@ LOGGING = {
},
},
'root': {
'handlers': ['console'],
'handlers': ['console', 'djdt_log'],
'level': 'DEBUG'
},
}