36 lines
1.1 KiB
Markdown
36 lines
1.1 KiB
Markdown
[Reviewed]
|
|
# ADR-0012: Structured application logging
|
|
|
|
## Status
|
|
|
|
Small standard-library sink adopted; spdlog proposed at server sink gate.
|
|
|
|
## Context
|
|
|
|
Diagnostics cannot inject I/O/time into simulation.
|
|
|
|
## Decision
|
|
|
|
Applications emit bounded structured severity/event records. Kernel returns values/errors. Proof uses typed static event names; future external strings require escaping/redaction. Timestamps stay separate from simulation identity.
|
|
|
|
## Alternatives Considered
|
|
|
|
spdlog provides compiled/header-only/async sinks under MIT with fmt obligations. Standard streams suffice initially; custom async logging duplicates mature work.
|
|
|
|
## Benefits
|
|
|
|
Immediate diagnostics behind replaceable boundary.
|
|
|
|
## Costs
|
|
|
|
Limited sink management and future escaping tests.
|
|
|
|
## Risks
|
|
|
|
Blocking output, secret leakage, unbounded payloads and logs mistaken for durable history.
|
|
|
|
## Consequences
|
|
|
|
At M7 measure bounded queue/drop/flush policies, allocations, tail latency, binary size and portability before pinning spdlog. Best-effort logs never establish recovery truth. [spdlog](https://github.com/gabime/spdlog).
|
|
|