From 4740df9d3c27d110234263d2c0c0ab496c7f2fe2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ciar=C3=A1n=20Ainsworth?= Date: Thu, 23 Nov 2023 10:39:17 +0000 Subject: [PATCH] feat(docs): Move docstring and clarify debug Part-of: --- api/config/settings/common.py | 31 ++++++++++++++++++------------- 1 file changed, 18 insertions(+), 13 deletions(-) diff --git a/api/config/settings/common.py b/api/config/settings/common.py index b6084078e..177597efd 100644 --- a/api/config/settings/common.py +++ b/api/config/settings/common.py @@ -18,6 +18,24 @@ ENV = env LOGLEVEL = ( "DEBUG" if env.bool("DEBUG", False) else env("LOGLEVEL", default="info").upper() ) +""" +Default logging level for the Funkwhale processes. + +.. note:: + The `DEBUG` variable overrides the `LOGLEVEL` if it is set to `TRUE`. + + The `LOGLEVEL` value only applies if `DEBUG` is `false` or not present. + +Available levels: + +- ``debug`` +- ``info`` +- ``warning`` +- ``error`` +- ``critical`` + +""" + IS_DOCKER_SETUP = env.bool("IS_DOCKER_SETUP", False) @@ -39,19 +57,6 @@ if env("FUNKWHALE_SENTRY_DSN", default=None) is not None: ) sentry_sdk.set_tag("instance", env("FUNKWHALE_HOSTNAME")) -""" -Default logging level for the Funkwhale processes - -Available levels: - -- ``debug`` -- ``info`` -- ``warning`` -- ``error`` -- ``critical`` - -""" # pylint: disable=W0105 - LOGGING_CONFIG = None logging.config.dictConfig( {