Logs
layer logs list reads retained Layeron log archives from the Storage bucket
created for streams that use retention.mode: "archive". Storage owns the
underlying R2 bucket.
Command
Section titled “Command”layer logs list [project] [options]Options
Section titled “Options”| Option | Value | Description |
|---|---|---|
--env | <name> | Environment. Defaults to default. |
--namespace | <name> | Log namespace. Required. |
--name | <name> | Log stream name. Required. |
--level | <level> | Filter by severity. |
--since | <time> | ISO time or duration such as 1h, 30m, or 2d. |
--until | <time> | ISO time. Defaults to now. |
--limit | <number> | Maximum records. Defaults to 50. |
--json | Print raw JSON records. |
Examples
Section titled “Examples”Read the last hour of retained API logs:
layer logs list . --env production --namespace api --name app --since 1hRead retained product errors:
layer logs list . --env production --namespace layeron --name d1-plus --level error --since 24hPrint JSON for tooling:
layer logs list . --env production --namespace api --name app --jsonThe query path uses the same reusable archive reader that future CLI views can use. The CLI only resolves local state, credentials, stream identity, and output formatting.