Files
claude-config/principles/logging.md

1008 B

Logging

Levels

Log levels have a standard, RFC5424: { emerg: 0, alert: 1, crit: 2, error: 3, warning: 4, notice: 5, info: 6, debug: 7 }.

We follow a simplified variant (sadly with non-matching numbers atm):

  • 0: Error - Crash or equivalent catastrophe that needs fairly immediate action.
  • 1: Warning - The app works, for now, but something is wrong and needs to be fixed.
  • 2: Info - Nothing is wrong, but this is important information that should be possible to find in a production system.
  • 3: Verbose - Somewhat more detailed information than Info, suitable level to enable in a production system where more information is needed for a limited time.
  • 4: Debug - Suitable level for development. If enabled in production, the logs will be flooded.

Infrastructure

All logging in our applications goes to OTLP or stdout.

In our server environments, nothing is saved to disk on the servers. Neither in Docker nor on the host. Everything is sent to Grafana Cloud via OTLP.