From 04ca92b5fee34c78815a1b868e38656fc934782a Mon Sep 17 00:00:00 2001 From: Adam Goldsmith Date: Sat, 4 May 2024 20:34:36 -0400 Subject: [PATCH] Make LOGGING setting configurable via environment variable --- cmsmanage/settings.py | 28 +++++++++++++++------------- 1 file changed, 15 insertions(+), 13 deletions(-) diff --git a/cmsmanage/settings.py b/cmsmanage/settings.py index 172105b..0e99e49 100644 --- a/cmsmanage/settings.py +++ b/cmsmanage/settings.py @@ -109,21 +109,23 @@ class Base(Configuration): STATIC_URL = "/static/" STATICFILES_DIRS = [BASE_DIR / "static"] - LOGGING = { - "version": 1, - "disable_existing_loggers": False, - "handlers": { - "my_console": { - "class": "logging.StreamHandler", + LOGGING = values.DictValue( + { + "version": 1, + "disable_existing_loggers": False, + "handlers": { + "my_console": { + "class": "logging.StreamHandler", + }, }, - }, - "loggers": { - "": { - "handlers": ["my_console"], - "level": "WARNING", + "loggers": { + "": { + "handlers": ["my_console"], + "level": "WARNING", + }, }, - }, - } + } + ) MEDIA_ROOT = "media" MEDIA_URL = "media/"