Logs connection-lifecycle subscribe

Open in

Use the ably logs connection-lifecycle subscribe command to subscribe to live connection lifecycle logs.

Synopsis

ably logs connection-lifecycle subscribe [options]

Options

--rewind

The number of messages to rewind when subscribing. Defaults to 0.

--duration | -D

The duration in seconds to subscribe for before automatically unsubscribing.

--client-id

A client ID to use when subscribing.

--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

Subscribe to connection lifecycle logs:

ably logs connection-lifecycle subscribe

Subscribe with rewind to receive recent logs:

ably logs connection-lifecycle subscribe --rewind 10

Subscribe to connection lifecycle logs in JSON format:

ably logs connection-lifecycle subscribe --json

Subscribe to connection lifecycle logs in formatted JSON:

ably logs connection-lifecycle subscribe --pretty-json

See also

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