Skip to content

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.

Terminal window
layer logs list [project] [options]
OptionValueDescription
--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.
--jsonPrint raw JSON records.

Read the last hour of retained API logs:

Terminal window
layer logs list . --env production --namespace api --name app --since 1h

Read retained product errors:

Terminal window
layer logs list . --env production --namespace layeron --name d1-plus --level error --since 24h

Print JSON for tooling:

Terminal window
layer logs list . --env production --namespace api --name app --json

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