Emit JSON logs through structlog, including uvicorn and stdlib loggers
configure_logging now builds one processor chain shared by structlog calls and foreign stdlib records (uvicorn, the consumers' getLogger), rendered as one JSON object per line on stdout. Tracebacks stay inside their line instead of splitting into one Docker log entry per frame. uvicorn.access is deliberately left untouched: --no-access-log works by disabling its propagation, and re-enabling it would bring access logs back (and inflate the healthz/lookup line counts the tests rely on). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 5.5
parent
7ddb614ded
commit
7be54a6ff9
@@ -8,5 +8,6 @@ redis==5.2.1
|
||||
pydantic==2.10.4
|
||||
pydantic-settings==2.7.1
|
||||
python-multipart==0.0.20
|
||||
structlog==25.5.0
|
||||
opentelemetry-distro==0.66b1
|
||||
opentelemetry-exporter-otlp==1.45.1
|
||||
|
||||
Reference in New Issue
Block a user