1
0
Fork 0
mirror of https://github.com/Kozea/Radicale.git synced 2025-09-15 20:36:55 +00:00

add support for conditional logging of backtrace_on_debug

This commit is contained in:
Peter Bieringer 2024-06-09 13:42:08 +02:00
parent ac14b01dda
commit ad596002f3
6 changed files with 25 additions and 6 deletions

View file

@ -142,7 +142,7 @@ def run() -> None:
# Preliminary configure logging
with contextlib.suppress(ValueError):
log.set_level(config.DEFAULT_CONFIG_SCHEMA["logging"]["level"]["type"](
vars(args_ns).get("c:logging:level", "")))
vars(args_ns).get("c:logging:level", "")), True)
# Update Radicale configuration according to arguments
arguments_config: types.MUTABLE_CONFIG = {}
@ -165,7 +165,7 @@ def run() -> None:
sys.exit(1)
# Configure logging
log.set_level(cast(str, configuration.get("logging", "level")))
log.set_level(cast(str, configuration.get("logging", "level")), configuration.get("logging", "backtrace_on_debug"))
# Log configuration after logger is configured
default_config_active = True