Aleph
Concepts

Logging

Structured logging, PII scrubbing, day-boundary rotation, and startup boundaries.

Aleph records structured events with tracing. A logging layer formats output and scrubs PII and secrets; logging is not a second source for the business error protocol.

Output and levels

The production default is INFO. TRACE is for detailed flow, DEBUG for diagnostics, WARN for recoverable issues, and ERROR for failures requiring attention. The directories and formats created by the running version are authoritative; do not rely on legacy [logging] field lists.

Logs must not contain API keys, tokens, personal messages, or other secrets. Probe payloads such as Guardian Judge data must not serialize secrets into logs or audit data.

Startup boundaries and rotation

The daemon rotates logs at day boundaries. At each startup it writes an ALEPH-BOOT marker at the beginning of the log, allowing operators to locate one startup's log range. It is not a business event or an error receipt. The sleep inhibitor remains silent on stderr.

Structured correlation

Log events carry time, level, target, and structured fields; request context is connected through tracing spans. Use fields and spans for aggregation and diagnosis rather than parsing natural-language messages.

Code locations

  • src/logging/: core logging layers and formatting
  • aleph-logging/: dedicated logging crate
  • Error Handling: error chains and Gateway error receipts

On this page