diff --git a/docs/env.md b/docs/env.md index 10e8f8141..748fb4809 100644 --- a/docs/env.md +++ b/docs/env.md @@ -13,13 +13,6 @@ GALLIA_CONFIG : The path to the config file usually called `gallia.toml`. Disables autodiscovery of the config. -GALLIA_LOGLEVEL -: When {meth}`gallia.log.setup_logging()` is called without an argument this environment variable is read to set the loglevel. - Supported value are: `trace`, `debug`, `info`, `notice`, `warning`, `error`, `critical`. - As an alternative, the int values from 0 to 7 can be used. - Mostly useful in own scripts or tests. - This variable is not read when using the gallia cli. - GALLIA_LOGGING_SYSTEMD : Tells gallia to omit colors and status bars in logging output. Additionally, the priority information gets added such that the journal can add it. diff --git a/src/gallia/log.py b/src/gallia/log.py index a83872948..f3e4dd2e3 100644 --- a/src/gallia/log.py +++ b/src/gallia/log.py @@ -243,18 +243,12 @@ def setup_logging( logging. :param level: The loglevel to enable for the console handler. - If this argument is None, the env variable - ``GALLIA_LOGLEVEL`` (see :doc:`../env`) is read. :param file_level: The loglevel to enable for the file handler. :param path: The path to the logfile containing json records. :param color_mode: The color mode to use for the console. """ if level is None: - # FIXME why is this here and not in config? - if (raw := os.getenv("GALLIA_LOGLEVEL")) is not None: - level = PenlogPriority.from_str(raw).to_level() - else: - level = Loglevel.DEBUG + level = Loglevel.DEBUG # These are slow and not used by gallia. logging.logMultiprocessing = False