vercel logs
Learn how to list out all runtime logs for a specific deployment using the vercel logs CLI command.The vercel logs
command displays and follows runtime logs data for a specific deployment.
Runtime logs are produced by Edge Middleware and Vercel Functions.
You can find more detailed runtime logs on the Logs page from the Vercel Dashboard.
From the moment you run this command, all newly emitted logs will display in your terminal, for up to 5 minutes, unless you interrupt it.
Logs are pretty-printed by default, but you can use the --json
option to display them in JSON format, which makes the output easier to parse programmatically.
vercel logs [deployment-url | deployment-id]
These are options that only apply to the vercel logs
command.
The --json
option, shorthand -j
, changes the format of the logs output from pretty print to JSON objects.
This makes it possible to pipe the output to other command-line tools, such as jq, to perform your own filtering and formatting.
vercel logs [deployment-url | deployment-id] --json | jq 'select(.level == "warning")'
The --follow
option has been deprecated since it's
now the default behavior.
The --follow
option, shorthand -f
, can be used to watch for additional logs output.
The --limit
option has been deprecated as the command
displays all newly emitted logs by default.
The --limit
option, shorthand -n
, can be used to specify the number of log lines to output.
The --output
option has been deprecated in favor of
the --json
option.
The --output
option, shorthand -o
, can be used to specify the format of the logs output, this can be either short
(default) or raw
.
The --since
option has been deprecated. Logs are
displayed from when you started the command.
The --since
option can be used to return logs only after a specific date, using the ISO 8601 format.
The --since
option has been deprecated. Logs are
displayed until the command is interrupted, either by you or after 5 minutes.
The --until
option can be used to return logs only up until a specific date, using the ISO 8601 format.
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?