vercel logs
The vercel logs command shows runtime logs for your project. Use vercel logs requests to list CDN request records.
By default, you get the latest 100 records from the last 30 minutes for the linked project, across production, preview, and custom environments. How far back you can query, and which request fields you can filter, depend on your plan. See runtime log limits and Observability Plus limitations.
You can find more detailed logs on the Logs page in the Edgenivo Dashboard.
# Runtime logs from the last 30 minutes
vercel logs
# CDN request records with a 5xx status
vercel logs requests --query 'httpStatus >= 500'Using the vercel logs command to view runtime logs or CDN request records.
These options only apply to the vercel logs command.
The --project option, shorthand -p, sets the project ID or name. It defaults to the linked project.
vercel logs --project my-appThe --deployment option filters by a deployment ID or URL.
vercel logs --deployment dpl_xxxxxThe --environment option filters by deployment environment, including custom environments.
vercel logs --environment productionThe -q, --query option filters results using Edgenivo's supported subset of Kibana Query Language (KQL).
vercel logs runtime --query 'level:error AND timeout'Filtering runtime logs to error entries that mention "timeout".
The following KQL syntax is supported:
| Syntax | Description |
|---|---|
field:value | The field equals the value. |
field:(a OR b) | The field matches any listed value. |
field:* | The field is present. |
field != value | The field does not equal the value. |
field > value, field >= value, field < value, field <= value | Compare a numeric field on request records, such as httpStatus. |
field:*text* | The field value contains text. |
AND, OR, NOT | Combine clauses. |
(...) | Group clauses. |
When you write a query:
| Rule | Description |
|---|---|
| Quoting | Wrap the complete query in single quotes. Double-quote values that contain spaces or KQL-reserved characters, including request IDs that contain colons. |
| Runtime logs | A bare word searches the message, case-insensitive. Multiple bare words combine with AND. |
requestId | Uses the query time window. When the request is older than 30 minutes, widen the window with --since. |
| Fields | Run vercel logs runtime --help or vercel logs requests --help to list the fields you can filter. |
The --since option, shorthand -s, sets the start of the time window. You can use a relative duration such as 1h or 30m, an ISO 8601 timestamp, or now. If you omit it, the window starts 30 minutes before --until, or 30 minutes before now.
vercel logs --since 2hThe --until option, shorthand -u, sets the end of the time window. It accepts the same values as --since. If you omit it, the command uses the current time.
vercel logs --since 2026-01-15T10:00:00Z --until 2026-01-15T11:00:00ZThe -n, --limit option sets the maximum number of records to return. The default is 100, and the maximum is 10,000.
vercel logs --limit 500The --next option, shorthand -N, continues a previous query. The cursor keeps the team, project, filter, and time window.
When the query matches more records than the command returned, table output prints a Next page: command. With --json, pass the summary line's pagination.next value. You can change --limit on the next page. Passing --next together with --project, --deployment, --environment, --query, --since, or --until fails with a usage error.
vercel logs --next <cursor>The --json option prints one JSON object per line. -F json prints the same output.
- Each record uses
{"type":"log"|"request","data":<event>}. Read fields under.data. - The last line is a
summarywithrecordsReturned,timeRange,pagination(hasMoreandnext), andexcludedIntervals.
An empty result prints only the summary line.
vercel logs runtime --query 'level:error' --json | jq 'select(.type == "log") | .data'Printing runtime logs as JSON Lines and reading each record with jq.
--non-interactive implies --json.
If you pass a removed option, the command fails with a usage error and prints the replacement.
| Old usage | Replacement |
|---|---|
--search <text> | --query with a bare word, for example --query 'timeout'. |
--level error | --query 'level:error'. |
--source serverless | --query 'source:function'. |
--source static | Static and CDN traffic is in vercel logs requests. |
--status-code 500 | vercel logs requests --query 'httpStatus:500'. |
--status-code 5xx | vercel logs requests --query 'httpStatus >= 500 AND httpStatus < 600'. |
--request-id <id> | --query 'requestId:"<id>"'. |
--branch <name> | No longer supported. Remove it from the command. |
--expand | Removed. The command shows full runtime messages by default. |
--no-follow, --no-branch | Removed. The command runs a query for the time window you set. |
Positional deployment, -d | --deployment. The -d shorthand is now always --debug. |
-j shorthand for JSON | --json or -F json. |
--follow is deprecated. The command prints a warning and returns the query results instead of streaming.
Show production runtime errors from the last hour:
vercel logs runtime --environment production --query 'level:error' --since 1hFiltering production runtime logs to errors from the last hour.
Show POST requests that missed the cache:
vercel logs requests --query 'requestMethod:POST AND cacheResult:MISS'Querying CDN request records for POST requests with a cache miss.
The following global options can be passed when using the vercel logs command:
--cwd--debug--global-config--help--local-config--no-color--non-interactive--scope--team--token--version
For more information on global options and their usage, refer to the options section.
Was this helpful?