Skip to content

Commit

Permalink
Introduce ADR on structured logging
Browse files Browse the repository at this point in the history
  • Loading branch information
abailly authored and Arnaud Bailly committed May 2, 2022
1 parent 0c03121 commit 70cd3b1
Showing 1 changed file with 29 additions and 0 deletions.
29 changes: 29 additions & 0 deletions docs/adr/002-use-structured-logging.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
---
slug: 2
title: |
2. Use simple structured logging
authors: []
tags: [Draft]
---

## Status

**Draft**

## Context

* Logs are a critical tool for operating any software system, enabling [observability](https://cloud.google.com/architecture/devops/devops-measurement-monitoring-and-observability) of the system.
* Following [12 Factor Apps](https://12factor.net/logs) 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](https://www.sumologic.com/glossary/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](https://zsiciarz.github.io/24daysofrust/book/vol2/day4.html) for Rust

0 comments on commit 70cd3b1

Please sign in to comment.