From d0923486747073aafb230d3c98ea1b6be28f9a5e Mon Sep 17 00:00:00 2001 From: Tom Hubrecht Date: Mon, 25 Nov 2024 22:54:26 +0100 Subject: [PATCH] fix(app/settings): Setup logging --- app/settings.py | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/app/settings.py b/app/settings.py index 2ceb886..087606b 100644 --- a/app/settings.py +++ b/app/settings.py @@ -27,6 +27,27 @@ ADMINS = credentials.get_json("ADMINS", []) SITE_ID = 1 +### +# Logging configuration + +LOGGING = credentials.get_json( + "LOGGING", + { + "version": 1, + "disable_existing_loggers": False, + "handlers": { + "console": { + "class": "logging.StreamHandler", + }, + }, + "root": { + "handlers": ["console"], + "level": credentials.get("LOG_LEVEL", "WARNING"), + }, + }, +) + + ### # List the installed applications