Use config instead of os.environ

This commit is contained in:
PCoder 2019-02-23 09:28:56 +01:00
parent 5c96f5c186
commit a3dca06c35

View file

@ -161,9 +161,11 @@ LOGGING = {
}, },
} }
if os.environ.get('ENABLE_DEBUG_LOG', '').strip().lower() == "true": if config('ENABLE_DEBUG_LOG', default=False, cast=bool):
loggers_dict = {} loggers_dict = {}
modules_to_log_list = os.environ.get('MODULES_TO_LOG', 'django').split(',') modules_to_log_list = config(
'MODULES_TO_LOG', default='django', cast=Csv()
)
for custom_module in modules_to_log_list: for custom_module in modules_to_log_list:
logger_item = { logger_item = {
custom_module: { custom_module: {