From 77209921f9d132cc18c453337f000dd90a4f9a32 Mon Sep 17 00:00:00 2001 From: PCoder Date: Fri, 1 Dec 2017 21:03:59 +0100 Subject: [PATCH] Some more refactoring --- dynamicweb/settings/base.py | 16 +++------------- 1 file changed, 3 insertions(+), 13 deletions(-) diff --git a/dynamicweb/settings/base.py b/dynamicweb/settings/base.py index 3f40d8a7..67734052 100644 --- a/dynamicweb/settings/base.py +++ b/dynamicweb/settings/base.py @@ -586,20 +586,10 @@ if ENABLE_LOGGING: if MODULES_TO_LOG is None: # set MODULES_TO_LOG to django, if it is not set MODULES_TO_LOG = 'django' - if ',' in MODULES_TO_LOG: - modules_to_log_list = MODULES_TO_LOG.split(',') - for custom_module in modules_to_log_list: - logger_item = { - custom_module: { - 'handlers': ['custom_file'], - 'level': LOG_LEVEL, - 'propagate': True - } - } - loggers_dict.update(logger_item) - else: + modules_to_log_list = MODULES_TO_LOG.split(',') + for custom_module in modules_to_log_list: logger_item = { - MODULES_TO_LOG: { + custom_module: { 'handlers': ['custom_file'], 'level': LOG_LEVEL, 'propagate': True