vercel logs
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.
# 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 1hUsing 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.
vercel logs --project my-appThe --deployment option, shorthand -d, specifies a deployment ID or URL to filter logs.
vercel logs --deployment dpl_xxxxxThe --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.
# Stream logs for the current branch's latest deployment
vercel logs --follow
# Stream logs for a specific deployment
vercel logs --follow --deployment dpl_xxxxxUse --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.
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.
vercel logs --expandThe --limit option, shorthand -n, specifies the maximum number of log entries to return. The default is 100.
vercel logs --limit 50The --environment option filters logs by deployment environment. Valid values are production and preview.
vercel logs --environment productionThe --level option filters logs by log level. You can specify multiple levels. Valid values are error, warning, info, and fatal.
vercel logs --level error --level warningThe --status-code option filters logs by HTTP status code. You can use specific codes or wildcards like 4xx or 5xx.
vercel logs --status-code 500
vercel logs --status-code 5xxThe --source option filters logs by request source. You can specify multiple sources. Valid values are serverless, edge-function, edge-middleware, and static.
vercel logs --source edge-function --source serverlessThe --query option, shorthand -q, performs a full-text search across log messages.
vercel logs --query "timeout"The --request-id option filters logs by a specific request ID.
vercel logs --request-id req_xxxxxThe --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.
vercel logs --since 1h
vercel logs --since 2026-01-15T10:00:00ZThe --until option returns logs up until a specific time. You can use ISO 8601 format or relative values. The default is now.
vercel logs --since 2h --until 1hThe --branch option, shorthand -b, filters logs by git branch. By default, the command detects your current git branch and filters to matching deployments.
vercel logs --branch feature-xUse --no-branch to disable automatic git branch detection and show logs from all branches.
Display error logs from the last hour:
vercel logs --level error --since 1hDisplay production logs with 500 errors and output as JSON:
vercel logs --environment production --status-code 500 --jsonSearch logs and pipe to jq:
vercel logs --query "timeout" --json | jq '.message'Display logs with full message details:
vercel logs --expand --limit 20The 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?