Logs history

Open in

Use the ably logs history command to retrieve application log history.

Synopsis

ably logs 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 application logs:

ably logs history

Retrieve logs within a time range:

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

Retrieve logs in forwards direction:

ably logs history --direction forwards

Retrieve a limited number of application logs:

ably logs history --limit 20

Retrieve application logs from the last hour:

ably logs history --start 1h

Retrieve application logs in JSON format:

ably logs history --json

Retrieve application logs in formatted JSON:

ably logs history --pretty-json

See also

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