> ## Documentation Index
> Fetch the complete documentation index at: https://getlago.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Logs

> Read activity, API and security logs with lago v2.

| Command | Description |
| - | - |
| `v2 activity-logs list` | Who changed what, newest first. |
| `v2 activity-logs get <activity_id>` | One activity log. |
| `v2 api-logs list` | API requests made to the organization, newest first. |
| `v2 api-logs get <request_id>` | One API request. |
| `v2 security-logs list` | Security events such as API key and user changes. |
| `v2 security-logs get <log_id>` | One security log. |

Logs require a premium license and available log storage. Security logs must also be enabled for the organization, are kept for 90 days, and `security-logs list` requires `--to-date`. All lists are cursor-paginated.

| List | Filters |
| - | - |
| `activity-logs` | `--from-date`, `--to-date`, `--activity-types`, `--activity-sources`, `--resource-types`, `--resource-ids`, `--user-emails`, `--external-customer-id` |
| `api-logs` | `--from-date`, `--to-date`, `--http-methods`, `--http-statuses`, `--request-paths`, `--api-version`, `--clients` |
| `security-logs` | `--from-date`, `--to-date`, `--log-types`, `--log-events`, `--user-ids`, `--api-key-ids` |

`lago logs tail` polls the v1 API logs endpoint. To follow v2 requests, poll `lago v2 api-logs list` with `--watch`, which re-renders when the response changes.

See [logs](https://getlago.com/docs/v2/guide/logs.md), [audit logs](https://getlago.com/docs/v2/guide/security/audit-logs.md) and [security logs](https://getlago.com/docs/v2/guide/security/security-logs.md).

```bash api-logs theme={"dark"}
lago v2 api-logs list --http-statuses 422 --limit 20
lago v2 api-logs list --from-date 2027-01-15 --watch
```

```bash activity-logs theme={"dark"}
lago v2 activity-logs list --external-customer-id acme --from-date 2027-01-01
```

```bash security-logs theme={"dark"}
# --to-date is required
lago v2 security-logs list --from-date 2027-01-01 --to-date 2027-01-31
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.