2. Use simple structured logging
· One min read
Status
Superseded by ADR 7
Context
- Logs are a critical tool for operating any software system, enabling observability of the system.
- Following 12 Factor Apps principles, providing the needed components and tools to be able to configure logging and monitoring should not be the responsibility of the software components
Decision
Therefore
- Each component of the system use Structured logging using documented and standardised JSON format for its logs
- Logs are always emitted to
stdout
of the process the component is part of
Consequences
- The schema of the logged items should be properly documented in a JSON schema
- It is the responsibility of the node operator to consume the logs and process them
- We use existing libraries to provide needed log infrastructure, like slog for Rust