Logs connection-lifecycle history

Open in

Use the ably logs connection-lifecycle history command to retrieve connection lifecycle log history.

Synopsis

ably logs connection-lifecycle history [options]

Options

--direction

The direction to retrieve logs in. Options are backwards or forwards. Defaults to backwards.

--limit

The maximum number of log entries to retrieve. Defaults to 100.

--start

The start of the time range to retrieve logs from. Accepts ISO 8601, Unix milliseconds, or relative time formats.

--end

The end of the time range to retrieve logs from. Accepts ISO 8601, Unix milliseconds, or relative time formats.

--json

Output results as compact JSON. Mutually exclusive with --pretty-json.

--pretty-json

Output results in formatted JSON. Mutually exclusive with --json.

--verbose | -v

Enable verbose logging. Can be combined with --json or --pretty-json.

Examples

Retrieve recent connection lifecycle logs:

ably logs connection-lifecycle history

Retrieve logs within a time range:

ably logs connection-lifecycle history --start "2025-01-01T00:00:00Z" --end "2025-01-02T00:00:00Z"

Retrieve a limited number of connection lifecycle logs:

ably logs connection-lifecycle history --limit 20

Retrieve connection lifecycle logs in forwards direction:

ably logs connection-lifecycle history --direction forwards

Retrieve connection lifecycle logs from the last hour:

ably logs connection-lifecycle history --start 1h

Retrieve connection lifecycle logs in JSON format:

ably logs connection-lifecycle history --json

Retrieve connection lifecycle logs in formatted JSON:

ably logs connection-lifecycle history --pretty-json

See also

  • Logs — Explore all ably logs commands.
  • CLI reference — Full list of available commands.