feat(06-02): add structlog dependency + create services/logging.py
- Append structlog>=25.5.0 to requirements.txt under Phase 6 D-01 comment - Create backend/services/logging.py with setup_logging(json_logs, log_level) - shared_processors: merge_contextvars first, then add_log_level, add_logger_name, PositionalArgumentsFormatter, ExtraAdder, TimeStamper(iso), StackInfoRenderer - JSON branch appends format_exc_info to shared_processors - JSONRenderer when json_logs=True, ConsoleRenderer when False - ProcessorFormatter bridges uvicorn/stdlib loggers through same chain - Idempotent: clears root handlers before installing new one - uvicorn.access propagate=False — middleware owns request logging
This commit is contained in:
@@ -32,3 +32,6 @@ google-api-python-client>=2.196.0
|
||||
msal>=1.36.0
|
||||
webdavclient3>=3.14.7
|
||||
cachetools>=5.3.0
|
||||
|
||||
# Observability (Phase 6 — D-01)
|
||||
structlog>=25.5.0
|
||||
|
||||
Reference in New Issue
Block a user