Skip to content

v0.4.0

@CodexDLC CodexDLC tagged this 20 May 20:45
Add set_log_context/clear_log_context/get_log_context via contextvars
for async-safe request-scoped field propagation (request_id, char_id,
correlation_id, etc.).

Modify setup_logging to branch on debug flag:
- Dev (debug=True): colorised console + file sinks (existing behavior)
- Prod (debug=False): JSON-serialised stdout only for Alloy/Loki/ELK

Both modes now apply a patcher that injects service name and contextvars
fields into every log record, and a healthcheck filter that suppresses
records tagged with healthcheck=True.
Assets 2
Loading