From ec5426c17c590743c36948f828a2d1dc86c5b561 Mon Sep 17 00:00:00 2001 From: Jens Diemer Date: Mon, 3 Apr 2023 15:59:33 +0200 Subject: [PATCH] Set log level by DEBUG / LOG_LEVEL for all loggers --- conf/settings.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/conf/settings.py b/conf/settings.py index efcdcf3..5dd8ea9 100644 --- a/conf/settings.py +++ b/conf/settings.py @@ -159,9 +159,10 @@ LOGGING['handlers']['log_file']['filename'] = str(LOG_FILE) # Example how to add logging to own app: LOGGING['loggers']['for_runners'] = { 'handlers': ['syslog', 'log_file', 'mail_admins'], - 'level': 'INFO', 'propagate': False, } +for __logger_name in LOGGING['loggers'].keys(): + LOGGING['loggers'][__logger_name]['level'] = 'DEBUG' if DEBUG else LOG_LEVEL # -----------------------------------------------------------------------------