Some more refactoring

This commit is contained in:
PCoder 2017-12-01 21:03:59 +01:00
parent b6e734d84e
commit 77209921f9

View file

@ -586,7 +586,6 @@ if ENABLE_LOGGING:
if MODULES_TO_LOG is None: if MODULES_TO_LOG is None:
# set MODULES_TO_LOG to django, if it is not set # set MODULES_TO_LOG to django, if it is not set
MODULES_TO_LOG = 'django' MODULES_TO_LOG = 'django'
if ',' in MODULES_TO_LOG:
modules_to_log_list = MODULES_TO_LOG.split(',') modules_to_log_list = MODULES_TO_LOG.split(',')
for custom_module in modules_to_log_list: for custom_module in modules_to_log_list:
logger_item = { logger_item = {
@ -597,15 +596,6 @@ if ENABLE_LOGGING:
} }
} }
loggers_dict.update(logger_item) loggers_dict.update(logger_item)
else:
logger_item = {
MODULES_TO_LOG: {
'handlers': ['custom_file'],
'level': LOG_LEVEL,
'propagate': True
}
}
loggers_dict.update(logger_item)
custom_handler_item = { custom_handler_item = {
'custom_file': { 'custom_file': {