Use the ably logs command group to stream and retrieve logs from Ably. These commands enable you to subscribe to live logs, retrieve log history, and monitor channel lifecycle, connection lifecycle, and push notification events.
Application logs
Use the following commands to subscribe to live application logs and retrieve log history:
| Command | Description |
|---|---|
ably logs subscribe | Subscribe to live app logs. |
ably logs history | Retrieve application log history. |
Channel lifecycle
Use the following command to stream channel lifecycle events from the [meta]channel.lifecycle metachannel. Channel lifecycle events indicate when channels become active or inactive:
| Command | Description |
|---|---|
ably logs channel-lifecycle subscribe | Subscribe to channel lifecycle events. |
Connection lifecycle
Use the following commands to stream and retrieve connection lifecycle logs. Connection lifecycle events are published to the [meta]connection.lifecycle metachannel when clients connect to and disconnect from Ably:
| Command | Description |
|---|---|
ably logs connection-lifecycle subscribe | Subscribe to live connection lifecycle logs. |
ably logs connection-lifecycle history | Retrieve connection lifecycle log history. |
Push notifications
Use the following commands to stream and retrieve push notification logs. Push notification logs track delivery events for messages sent via APNs, FCM, and web push:
| Command | Description |
|---|---|
ably logs push subscribe | Subscribe to push notification logs. |
ably logs push history | Retrieve push notification log history. |
See also
- CLI reference — Full list of available commands.