fix(api): Set logger to DEBUG if DEBUG is enabled

Part-of: <https://dev.funkwhale.audio/funkwhale/funkwhale/-/merge_requests/2643>
environments/review-docs-fix-b-9vkwmw/deployments/18816
Georg Krause 2023-11-23 10:23:39 +00:00 zatwierdzone przez Marge
rodzic 3db367f4bc
commit 43c2861252
2 zmienionych plików z 6 dodań i 1 usunięć

Wyświetl plik

@ -13,7 +13,11 @@ APPS_DIR = ROOT_DIR.path("funkwhale_api")
env = environ.Env()
ENV = env
LOGLEVEL = env("LOGLEVEL", default="info").upper()
# If DEBUG is `true`, we automatically set the loglevel to "DEBUG"
# If DEBUG is `false`, we try to read the level from LOGLEVEL environment and default to "INFO"
LOGLEVEL = (
"DEBUG" if env.bool("DEBUG", False) else env("LOGLEVEL", default="info").upper()
)
IS_DOCKER_SETUP = env.bool("IS_DOCKER_SETUP", False)

Wyświetl plik

@ -0,0 +1 @@
Connect loglevel and debug mode (#1538)