From 3da526f20ef3d27f68df6fa097e1123233e8ea63 Mon Sep 17 00:00:00 2001 From: Jens Langhammer Date: Mon, 20 Dec 2021 21:11:47 +0100 Subject: [PATCH] root: allow trace log level to work for core/embedded Signed-off-by: Jens Langhammer --- authentik/root/settings.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/authentik/root/settings.py b/authentik/root/settings.py index 709feec55..c6e95c3b0 100644 --- a/authentik/root/settings.py +++ b/authentik/root/settings.py @@ -461,6 +461,11 @@ TEST = False TEST_RUNNER = "authentik.root.test_runner.PytestTestRunner" # We can't check TEST here as its set later by the test runner LOG_LEVEL = CONFIG.y("log_level").upper() if "TF_BUILD" not in os.environ else "DEBUG" +# We could add a custom level to stdlib logging and structlog, but it's not easy or clean +# https://stackoverflow.com/questions/54505487/custom-log-level-not-working-with-structlog +# Additionally, the entire code uses debug as highest level so that would have to be re-written too +if LOG_LEVEL == "TRACE": + LOG_LEVEL = "DEBUG" structlog.configure_once( processors=[