# Logging ## Purpose Make debugging possible. --- # Log Levels Use: Trace. Debug. Information. Warning. Error. Critical. --- # Do Not Log Never log: - Passwords. - Tokens. - API keys. - Private documents. --- # Useful Logs Include: - Operation. - User context where safe. - Error details. - Correlation IDs. ## Runtime output Production emits structured JSON to stdout for Docker collection. Development keeps readable console and debug output. The request middleware records method, path, status, elapsed milliseconds, trace ID, and authenticated subject when present. Unhandled errors use the same trace ID in their Problem Details response so an operator can correlate the client report with `docker logs`. Compose retains three 10 MB local log files per service. There is no external sink; add Seq/OTLP only when single-node Docker logs stop being operationally sufficient.