Menu

vercel logs

Last updated February 10, 2026

The vercel logs command displays request logs for your project or streams live runtime logs from a specific deployment.

By default, running vercel logs shows request logs from the last 24 hours for the linked project and branch. You can filter logs by environment, log level, status code, source, and more.

To stream live logs, use the --follow flag. Live streaming continues for up to 5 minutes unless interrupted.

You can find more detailed logs on the Logs page in the Vercel Dashboard.

terminal
# Display recent request logs for the linked project
vercel logs
 
# Stream live logs for the current git branch
vercel logs --follow
 
# Filter logs by level and time range
vercel logs --level error --since 1h

Using the vercel logs command to view request logs or stream runtime logs.

These options only apply to the vercel logs command.

The --project option, shorthand -p, specifies the project ID or name. Defaults to the linked project.

terminal
vercel logs --project my-app

The --deployment option, shorthand -d, specifies a deployment ID or URL to filter logs.

terminal
vercel logs --deployment dpl_xxxxx

The --follow option, shorthand -f, streams live runtime logs instead of showing request logs.

When using --follow, the command finds the latest deployment for your current git branch. You can combine it with --deployment to stream logs for a specific deployment.

terminal
# Stream logs for the current branch's latest deployment
vercel logs --follow
 
# Stream logs for a specific deployment
vercel logs --follow --deployment dpl_xxxxx

Use --no-follow to disable auto-following when a deployment ID or URL is given as the first argument.

The --json option, shorthand -j, outputs logs in JSON Lines format. This makes it easier to pipe the output to other command-line tools such as jq.

terminal
vercel logs --json | jq 'select(.level == "error")'

The --expand option, shorthand -x, displays the full log message below each request line instead of truncating it.

terminal
vercel logs --expand

The --limit option, shorthand -n, specifies the maximum number of log entries to return. The default is 100.

terminal
vercel logs --limit 50

The --environment option filters logs by deployment environment. Valid values are production and preview.

terminal
vercel logs --environment production

The --level option filters logs by log level. You can specify multiple levels. Valid values are error, warning, info, and fatal.

terminal
vercel logs --level error --level warning

The --status-code option filters logs by HTTP status code. You can use specific codes or wildcards like 4xx or 5xx.

terminal
vercel logs --status-code 500
vercel logs --status-code 5xx

The --source option filters logs by request source. You can specify multiple sources. Valid values are serverless, edge-function, edge-middleware, and static.

terminal
vercel logs --source edge-function --source serverless

The --query option, shorthand -q, performs a full-text search across log messages.

terminal
vercel logs --query "timeout"

The --request-id option filters logs by a specific request ID.

terminal
vercel logs --request-id req_xxxxx

The --since option returns logs from after a specific time. You can use ISO 8601 format or relative values like 1h or 30m. The default is 24 hours ago.

terminal
vercel logs --since 1h
vercel logs --since 2026-01-15T10:00:00Z

The --until option returns logs up until a specific time. You can use ISO 8601 format or relative values. The default is now.

terminal
vercel logs --since 2h --until 1h

The --branch option, shorthand -b, filters logs by git branch. By default, the command detects your current git branch and filters to matching deployments.

terminal
vercel logs --branch feature-x

Use --no-branch to disable automatic git branch detection and show logs from all branches.

Display error logs from the last hour:

terminal
vercel logs --level error --since 1h

Display production logs with 500 errors and output as JSON:

terminal
vercel logs --environment production --status-code 500 --json

Search logs and pipe to jq:

terminal
vercel logs --query "timeout" --json | jq '.message'

Display logs with full message details:

terminal
vercel logs --expand --limit 20

The following global options can be passed when using the vercel logs command:

For more information on global options and their usage, refer to the options section.


Was this helpful?

supported.