Logging — architecture (arc42)¶
Architecture documentation for the workspace-wide logging facade and its default DLT backend (see Logging — DLT base library with swappable backends), structured per the arc42 template and encoded with sphinx-needs using the useblocks “x-as-code” arc42 directive types. Mirrors the structure of CANopen device-driver codegen — architecture (arc42) for diff-friendly review.
Each architectural element :refines: or :implements: a parent
requirement so the trace is preserved end-to-end.
This chapter is split across pages (see the toctree): the framing sections §1–§2 (goals and constraints) live here on the index; the context-and-scope flows and the building-block decomposition (§3–§4) live in Context, scope, and building blocks; the runtime data-flow and control-plane sequences live in Runtime view; and the architecture decisions (§5) live in Architecture decisions.
1. Introduction and goals¶
The chapter’s reason-to-exist is a single logging surface that all
taktora crates emit through, with DLT as the default backend and a
clear swap path for ``log4rs`` / ``env_logger`` / bespoke loggers.
Vehicle integrators get AUTOSAR-spec’d DLT to a co-located
dlt-daemon; non-vehicle integrators replace the backend at
process boot without touching any caller site.
Quality goals capture the qualities the architecture is optimised for.
Every taktora crate shall emit through one stable facade — the
|
taktora’s events shall surface in the standard COVESA DLT
ecosystem — DLT Viewer, dlt-tui, |
Emitting a log record shall not block the calling thread, shall not allocate on the producer side for ERROR / FATAL records, and shall not require coordinated state between producer and flusher beyond a bounded SPSC/SPMC queue. Overload manifests as the documented drop policy, never as a stall in the executor. |
Local development and CI must work without a running
|
2. Constraints¶
The workspace logging facade shall be the |
|
Both |
Logging is treated as QM. No |