@@ -93,21 +93,25 @@ def _is_tty() -> bool:
9393
9494
9595_render_as_json = not _is_tty ()
96- _structlog_processors = default_structlog_processors (as_json = _render_as_json )
96+ _structlog_default_processors = default_structlog_processors (as_json = _render_as_json )
97+ _structlog_default_processors .insert (1 , structlog .processors .EventRenamer ("message" ))
98+ _structlog_standard_lib_processors = default_structlog_standard_lib_processors (as_json = _render_as_json )
99+ _structlog_standard_lib_processors .insert (1 , structlog .processors .EventRenamer ("message" ))
100+
97101if settings .app .OPENTELEMETRY_ENABLED :
98- _structlog_processors .insert (- 1 , logfire .StructlogProcessor ())
102+ _structlog_default_processors .insert (- 1 , logfire .StructlogProcessor ())
99103log = StructlogConfig (
100104 enable_middleware_logging = False ,
101105 structlog_logging_config = StructLoggingConfig (
102106 log_exceptions = "always" ,
103- processors = _structlog_processors ,
107+ processors = _structlog_default_processors ,
104108 logger_factory = default_logger_factory (as_json = _render_as_json ),
105109 standard_lib_logging_config = LoggingConfig (
106110 root = {"level" : logging .getLevelName (settings .log .LEVEL ), "handlers" : ["queue_listener" ]},
107111 formatters = {
108112 "standard" : {
109113 "()" : structlog .stdlib .ProcessorFormatter ,
110- "processors" : default_structlog_standard_lib_processors ( as_json = _render_as_json ) ,
114+ "processors" : _structlog_standard_lib_processors ,
111115 },
112116 },
113117 loggers = {
0 commit comments