Skip to content

Add bounded JSON Lines output for logs and follow mode #36

Description

@delaudio

Parent epic: #31

Problem

Editor integrations need a cancellable log stream with service and stream identity. Plain terminal lines are ambiguous when multiple services are followed.

Scope

Add an opt-in JSON Lines format:

hum <project> <template> logs [service] --format jsonl --lines 200
hum <project> <template> logs [service] --format jsonl --follow

Each line should be one independently parseable event.

Acceptance criteria

  • Every event includes schemaVersion, service name, stream identity, and message text.
  • Events include a timestamp or an explicit null when the source has none.
  • Snapshot and follow modes use the same event schema.
  • Multi-service follow output can be attributed without parsing message prefixes.
  • Existing redaction, line-size, retention, and memory bounds still apply.
  • Consumer cancellation terminates followers and child processes cleanly.
  • Rotation and snapshot-to-follow transitions do not duplicate or drop completed lines.
  • Structured errors do not appear as malformed JSONL events.
  • Existing plain log output remains the default.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions