Arguments
Flags
Stream log events until interrupted. Required: this command only streams, and there’s no one-off read.
Print newline-delimited JSON (NDJSON), one record per line. See JSON output.
Examples
Human output
Each event is printed on its own line as it arrives. Log text comes straight from the database, so the CLI cleans out terminal control characters before printing. A log line can’t repaint your terminal or fake other output. Notices, such as reconnect messages, go to stderr. Piping stdout into a file or another tool captures only log lines.JSON output
With--json, stdout carries one JSON record per line:
The
type, event and error keys are part of the CLI’s stable output. The contents of event are passed through exactly as the API sent them and are not a stable format: fields may change. Read them defensively. If an event isn’t JSON, it’s passed through as a string.error record.
Reconnecting
If the connection drops for a reason that can be retried, the CLI reconnects on its own. This includes network failures,429 (too many log streams open for the organization) and 503 (the log stream couldn’t attach to the database).
- It keeps trying for as long as you let it, waiting longer between attempts each time, up to 30 seconds.
--followmeans follow, so an outage doesn’t quietly cut the log short. - It picks up where it left off, from the time of the last event it saw.
- Events may still be missed during the gap. Each reconnect prints
Reconnecting to the log stream; events may have been missed during the gap.on stderr, so you can see where a gap might be. --tailapplies only to the first connection. A reconnect doesn’t replay history again.
1.
Stopping
Press Ctrl-C, or sendSIGTERM. The CLI closes the stream, cancels any pending reconnect and exits with code 130.