Logging — DLT base library with swappable backends¶
Requirements for the workspace-wide logging facade and its default DLT
backend. The chapter introduces two new crates — taktora-log (the
facade) and taktora-log-dlt (the DLT backend) — and documents how
they coexist with the existing taktora-executor-tracing.
The design rationale, alternatives considered, and reference deployment
context (COVESA dlt-daemon, AUTOSAR R20-11) live in the companion design
doc docs/superpowers/specs/2026-05-18-taktora-log-dlt-design.md
in the repository root.
The umbrella is split into eight capability-cluster sub-features. Each
sub-feature :satisfies: an umbrella; each req :satisfies:
exactly one capability-cluster feature. Each sub-feature has its own
page (see the toctree): the facade (taktora-log facade crate (FEAT_0071)), the
backend-swap surface (Backend-swap surface (FEAT_0073)), the tracing bridge
(tracing-log bridge for exis... (FEAT_0078)), the DLT backend (taktora-log-dlt DLT-protoco... (FEAT_0072)), structured
fields (Structured key-value fields... (FEAT_0074)), runtime log-level control
(Runtime per-context log-lev... (FEAT_0075)), the offline ring buffer (Offline ring buffer with re... (FEAT_0076)), and
the console dev fallback (Console dev fallback (FEAT_0077)).
Top-level umbrella¶
A workspace-wide logging surface used by every taktora crate and by any downstream connector. The umbrella satisfies two competing forces simultaneously:
The resolution is to commit to the rust-native The umbrella decomposes into the capability clusters below. |
Requirements at a glance¶
ID |
Title |
Status |
Satisfies |
|---|---|---|---|
taktora-log facade crate |
approved |
||
taktora-log-dlt DLT-protocol backend |
approved |
||
Backend-swap surface |
approved |
||
Structured key-value fields mapped to DLT verbose args |
approved |
||
Runtime per-context log-level control |
approved |
||
Offline ring buffer with reconnect drain |
approved |
||
Console dev fallback |
approved |
||
tracing-log bridge for existing tracing emitters |
approved |
||
Single facade for all taktora crates |
implemented |
||
taktora-log re-exports log macros |
implemented |
||
LogSink trait defines backend extension surface |
implemented |
||
One-shot init builder selects the backend |
implemented |
||
Integrator may install any log::Log implementation |
implemented |
||
tracing-log bridge installed at init |
implemented |
||
AUTOSAR Classic DLT R20-11 encoding via dlt-core |
implemented |
||
UDS (default) and TCP transports to a local dlt-daemon |
implemented |
||
4-character DLT App ID and Context ID per emitting crate |
implemented |
||
log::kv pairs encoded as DLT verbose arguments |
implemented |
||
Set-Log-Level and Set-Default-Log-Level control messages |
implemented |
||
Production default level is INFO |
implemented |
||
Emission shall not block the calling thread |
implemented |
||
ERROR and FATAL emission shall not heap-allocate |
approved |
||
Bounded in-memory ring buffers records while daemon is down |
implemented |
||
Drop-oldest overflow policy with summary record on reconnect |
approved |
||
Console fallback installed when no daemon and no other logger |
approved |