From 02b0dc1387b6b2d655faf68cdc9b320afd66118d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fran=C3=A7ois=20Voron?= Date: Thu, 21 Mar 2024 15:19:38 +0100 Subject: [PATCH] server/dx: fix Uvicorn logs not outputting extra data --- server/polar/logging.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/server/polar/logging.py b/server/polar/logging.py index 41a1d091ae..d54968f102 100644 --- a/server/polar/logging.py +++ b/server/polar/logging.py @@ -58,10 +58,15 @@ def configure_stdlib(cls) -> None: cls.get_renderer(), ], "foreign_pre_chain": [ + structlog.contextvars.merge_contextvars, structlog.stdlib.add_log_level, structlog.stdlib.add_logger_name, + structlog.stdlib.PositionalArgumentsFormatter(), structlog.stdlib.ExtraAdder(), cls.timestamper, + structlog.processors.UnicodeDecoder(), + structlog.processors.StackInfoRenderer(), + structlog.processors.format_exc_info, ], }, },