•
2 min read

Persistent logging

Table of Contents

hum persists stdout and stderr independently for every detached service. A small native sink rotates both streams and exits automatically when they close; CLI and TUI readers do not own the service pipes.

Configure retention and exporters

logs:
  max_file_bytes: 10485760
  rotated_files: 3
  max_line_bytes: 65536
  retention: 7d
  redact_patterns:
    - "(?i)(token|password)=[^ ]+"
  exporters:
    - type: http
      endpoint: http://127.0.0.1:8687/events
      timeout: 750ms
      headers:
        Authorization: "Bearer machine-local-token"

max_file_bytes bounds every active or rotated stream file. rotated_files controls the retained generations, while retention removes expired rotations when sinks start and rotate. max_line_bytes bounds display buffers for unusually long or newline-free output.

Redaction patterns apply when logs are displayed or exported; raw persisted files remain faithful to the original process output.

Log exporters

Optional exporters forward a redacted NDJSON stream of process-runtime logs over HTTP to local log collectors (e.g. Vector). Header values containing sensitive machine-local tokens can live in an untracked hum.local.yaml. Exporters operate on a best-effort, non-blocking queue and never delay or interrupt service execution.

Read logs

# Combined template tail
hum storefront all-services logs --lines 100

# Follow one service
hum storefront all-services logs api --lines 100 --follow

The initial CLI tail reads a bounded amount from each stream and reports truncation. In the TUI, scrolling pauses live follow, Home loads older pages, End returns to the tail, / searches the loaded view, and c clears only the view—not the files.