Skip to content

Improved Logs

Learn how to search, inspect, and share your runtime logs with the Logs tab.

Improved Logs are available in Beta on Enterprise plans

The Logs tab inside your Vercel dashboard allows you to view, search, inspect, and share your functions without any third-party integration. You can filter and group your runtime logs based on the relevant fields.

Teams on an Enterprise plan can access Logs from their team dashboard. If you want to inspect the logs of your static assets, serverless, and edge functions in a detailed manner at runtime, use the Logs view.

Note: This is an improved logs view. The existing log view still remains.

The Runtime Logs include static requests made to your Vercel projects and Serverless and Edge Functions log messages. These log results provide an output for your functions, user-invoked logging, and the details of the request made to the function.

The Logs interface provides an intuitive solution to debug and analyze errors that are generated by these function requests to your website.

To view Runtime Logs, go to your Vercel dashboard, and click the Logs tab from the top header. Each request that a user makes to your site will list one or multiple log entries.

Logs displays a full-page UI that helps you view, filter, and search through the runtime logs. Each log row shares basic info about every log result like time, domain name, HTTP status, function type, and RequestId.

Note: You can only view the Logs tab in the desktop view currently. We are working to improve this as we progress towards general availability.

Layout to visualize the Runtime Logs.

You can filter logs in two ways:

  • Left side filter options like timeline, level, and type
  • Searching logs

Use the Filters from the left sidebar of the Logs to get a refined search experience. Six different categories help you filter your log results based on:

You can filter runtime logs based on a specific timeline. It can vary from the past hour, day, week, last 10 days, or a custom timespan. Real-time logs can be generated in Live mode.

Options to filter log results based on a selected timeline.

Unlike Build logs that are stored indefinitely for each Deployment, runtime logs are not stored for an indefinite period. When you filter by custom time, please note that you cannot get any logs from before those 10 days.

Note: All displayed dates and times are in UTC.

You can filter by three kinds of log levels for example, Info, Warning, and Error.

Options to filter log results based on a selected level.

  • Serverless and Edge logs with an output stdout are marked as Info (for example, console.log)
  • Serverless and Edge logs with an output stderr are marked as Error (for example, console.error)
  • Requests with a status code of 4xx are considered a Warning
  • Requests with a status code of 5xx are considered Error
  • All other requests are considered Info

These levels are highlighted with different colors i.e., yellow for warnings and red for errors. This color coding is beneficial with debugging; you can quickly identify the failed requests and the reason behind the failure.

The project filter lets you view logs for one or more projects associated with your Enterprise team. To avoid scrolling down the entire list, you can use the “Search projects” field instead to navigate you to the desired project instantly.

You can use the Functions filter category to analyze logs for one or more functions defined in your serverless application. All team member roles on an Enterprise team can view the functions list.

Like Projects and Functions, you can filter your logs based on all the domains and sub-domains attached to your team’s projects. All team member roles on an Enterprise team can view the domains list.

Using the type filter, you can search for three logs types that are generated as a result of:

  • Request: These are the logs generated from your static asset requests. The log rows for this type contain info about the time, HTTP status code, and details about the request method
  • Serverless Function: Logs generated as a result of your Serverless Functions invocations. The log details include additional runtime Request Id details as well along with other basic info
  • Edge Middleware & Function: Logs requests generated from your Edge Middleware and Edge Functions. The log info includes details like time, domain, and the request method

Options to filter log results based on a selected type(s).

You can use the main search field to filter logs by using only the followings substrings: time, message, domain, and function. All the remaining fields, like status codes and HTTP requests, are not searchable.

In the current search state, filtered log results are sorted by the most recent entries followed by the older ones. Filtered values can also be searched from the main search bar.

To improve your debugging experience one step further, Logs empowers you to view details for every generated runtime log. When you click a log from the list, the details appear in the right sidebar. These details are helpful when your deployment runs into an error, and you want to investigate the cause.

You can view the following details:

Info
Description
Log Name
Title of the log generated
Time
Timestamp at which the log was recorded
Status Code
HTTP status code for the log message
Domain
Name of the domain for which the log was generated
Request Id
Unique identifier of request created only for runtime logs
Level
The level type for example, Info, Warning, or Error
Type
Can be Request, Edge Function, or Serverless Function
Function
The function name defined in your /pages/api folder
Location
The geographical region of function access (info only applies to Serverless Function type)
Runtime
Name of the JavaScript runtime environment for Node.js (info only applies to Serverless Function type)
Duration/Limit
Time duration for the log record result (info only applies to Serverless Function type)
Memory used/Limit
The size of memory that was consumed by the function (info only applies to Serverless Function type)
Lambda Size
The size of the Serverless Function (info only applies to Serverless Function type)
Log Message
A detailed log message with additional details for START and END RequestId, Billed Duration, Max Memory Used, etc.

Logs can be copied by clicking the copy icon, so that you can share it with other team members.

Towards the end of the log results window is a button called “50+ New Logs,” empowered by the live-logging mechanism. By default, it is set to display log results for the past hour.

Click this button, and it reloads another 50 new rows of logs. The latest entries are added based on the filters you are using. If the logs produced at request time is less than 50, for example, 30 or 40, that number will be reflected on the button.

You can share a log entry with other team members so they can view the same log rows and states you are looking at. To do so, click on the log row, copy the current URL of your browser and send it to team members via the medium of your choice.