From d646c88c0cf8ed3470f9834a117998887fbc60ca Mon Sep 17 00:00:00 2001 From: Tomas Gavenciak Date: Sun, 25 Oct 2015 12:43:12 +0100 Subject: [PATCH] Dalsi upravy loggeru ... --- mamweb/settings_common.py | 8 +++++++- mamweb/settings_prod.py | 1 + mamweb/settings_test.py | 1 + 3 files changed, 9 insertions(+), 1 deletion(-) diff --git a/mamweb/settings_common.py b/mamweb/settings_common.py index 7c44d571..e4f3ddd5 100644 --- a/mamweb/settings_common.py +++ b/mamweb/settings_common.py @@ -190,7 +190,7 @@ except: LOGGING = { 'version': 1, - 'disable_existing_loggers': True, + 'disable_existing_loggers': False, 'formatters': { 'verbose': { @@ -199,6 +199,12 @@ LOGGING = { }, 'loggers': { + + 'django': { + 'handlers': ['console'], + 'level': 'DEBUG', + }, + # Catch-all logger '': { 'handlers': ['console'], # Add 'mail_admins' in prod and test diff --git a/mamweb/settings_prod.py b/mamweb/settings_prod.py index 48646ebb..ee8233e3 100644 --- a/mamweb/settings_prod.py +++ b/mamweb/settings_prod.py @@ -63,5 +63,6 @@ CSRF_COOKIE_SECURE = True # LOGGING LOGGING['loggers']['']['handlers'] = ['console', 'mail_admins'] +LOGGING['loggers']['django']['handlers'] = ['console', 'mail_admins'] diff --git a/mamweb/settings_test.py b/mamweb/settings_test.py index b1d3a7c1..abe315ad 100644 --- a/mamweb/settings_test.py +++ b/mamweb/settings_test.py @@ -61,6 +61,7 @@ CSRF_COOKIE_SECURE = True # LOGGING LOGGING['loggers']['']['handlers'] = ['console', 'mail_admins'] +LOGGING['loggers']['django']['handlers'] = ['console', 'mail_admins']