feat: Use unicode json logs output

This commit is contained in:
2026-05-09 18:30:51 +03:00
parent 6d3c02e6f3
commit c2fd21b3f9
2 changed files with 21 additions and 2 deletions
+6 -1
View File
@@ -1,5 +1,6 @@
from __future__ import annotations
import json
import logging
import logging.config
import tomllib
@@ -79,7 +80,11 @@ def setup_logging(settings: LoggingSettings) -> None:
},
"json": {
"()": structlog.stdlib.ProcessorFormatter,
"processor": structlog.processors.JSONRenderer(),
"processor": structlog.processors.JSONRenderer(
serializer=lambda obj, **kwargs: json.dumps(
obj, ensure_ascii=False, **kwargs
)
),
"foreign_pre_chain": shared_processors,
},
},