Reference

Runtime Logs

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

Runtime Logs are available on all plans

Those with the owner, member, developer role can access this feature

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

You can only view runtime logs from the Logs tab. Build logs can be accessed from the production deployment tile.

Runtime logs include all logs generated by Serverless and Edge Function invocations in both preview and production deployments. These log results provide information about the output for your functions as well as the console.log output.

With runtime logs:

  • Logs are shown in realtime and grouped as per request.
  • Each action of writing to standard output, such as using console.log, results in a separate log entry.
  • The maximum number of logs is 256 lines per request
  • Each of those logs can be up to 256 KB per line
  • The sum of all log lines can be up to 1 MB per request

You can view the following log types in the Logs tab:

Log TypeAvailable in Runtime Logs
Serverless Function InvocationYes
Edge Function InvocationYes
Edge Middleware InvocationYes
Static RequestOnly static request that serves cache; to get all static logs check Log Drains

To view runtime logs:

  1. From the dashboard, select the project that you wish to see the logs for
  2. Select the Logs tab from your project overview
  3. From here you can view, filter, and search through the runtime logs. Each log row shares basic info about the request, like execution, domain name, HTTP status, function type, and RequestId.
Layout to visualize the runtime logs.
Layout to visualize the runtime logs.
Layout to visualize the runtime logs.
Layout to visualize the runtime logs.

You can use the following filters from the left sidebar to get a refined search experience.

You can filter runtime logs based on a specific timeline. It can vary from the past hour, last 3 days, or a custom timespan depending on your account type. You can use the Live mode option to follow the logs in real-time.

Layout to visualize the runtime logs in live mode.
Layout to visualize the runtime logs in live mode.
Layout to visualize the runtime logs in live mode.
Layout to visualize the runtime logs in live mode.
All displayed dates and times are in UTC.

You can filter requests that contain Warning, and Error logs. A request can contain both types of logs at the same time. Streaming Functions will always preserve the original intent:

SourceStreaming FunctionsNon-streaming Functions
stdout (e.g. console.log)infoinfo
stderr (e.g. console.error)errorerror
console.warnwarningerror

Additionally:

  • Requests with a status code of 4xx are marked with Warning amber
  • Requests with a status code of 5xx are marked with Error red
  • All other individual log lines are considered Info

You can filter and analyze logs for one or more functions defined in your project. The log output is generated for the Serverless Functions, Edge Functions, and Edge Middleware.

You can view logs for one or more domains and subdomains attached to your team’s project. Alternatively, you can use the Search hosts... field to navigate to the desired host.

Like host and functions, you can filter your logs based on deployments URLs.

Using the resource filter, you can search for requests containing logs generated as a result of:

ResourceDescription
Serverless FunctionsLogs generated from your Serverless Functions invocations. Log details include additional runtime Request Id details and other basic info
Edge MiddlewareLogs generated as a result of your Edge Middleware invocations
Edge FunctionsLogs requests generated from your Edge Functions. Log info includes time, domain, and the request method
Edge CacheLogs generated from proxy serving cache

You can filter your logs based on framework-defined mechanism or rendering strategy used such as API routes, Incremental Static Regeneration (ISR), and cron jobs.

You can filter your logs based on the request method used by a function such as GET or POST.

You can filter your logs based on the request path used by a function such as /api/my-function.

You can filter your logs based on the cache behavior such as HIT or MISS.

You can use the main search field to filter logs by their messages. In the current search state, filtered log results are sorted chronologically, with the most recent first. Filtered values can also be searched from the main search bar.

ValueDescription
FunctionThe function name
RequestPathThe request path name
RequestTypeThe request rendering type. For example API endpoints or Incremental Static Regeneration (ISR)
LevelThe level type. Can be Info, Warning, or Error
ResourceCan be Edge Cache, Serverless Function, Edge Middleware, and Edge Function
HostName of the domain or subdomain for which the log was generated
DeploymentThe name of your deployment
MethodThe request method used. For example GET, POST etc.
CacheCache status with the values HIT, MISS, STALE, BYPASS, PRERENDER or REVALIDATED
StatusHTTP status code for the log message
RequestIDUnique identifier of request. This is visible on a 404 page, for example.

This free text search feature is limited to the message and requestPath field. Other fields can be filtered using the left sidebar or the filters in the search bar.

You can view details for each request to analyze and improve your debugging experience. When you click a log from the list, the following details appear in the right sidebar:

InfoDescription
Request PathRequest path of the log
TimeTimestamp at which the log was recorded in UTC
Status CodeHTTP status code for the log message
HostName of the domain or subdomain for which the log was generated
Request IdUnique identifier of request created only for runtime logs
Request User AgentName of the browser from which the request originated
Search ParamsSearch parameters of the request path
FirewallIf request was allowed through firewall
Edge CacheCache status with the values HIT, MISS, STALE, BYPASS, PRERENDER or REVALIDATED
MiddlewareMetadata about middleware execution such as location and external api
FunctionMetadata about function execution including function name, location, runtime, and duration
DeploymentMetadata about the deployment that produced the logs including id, environment and branch
Log MessageThe bottom panel shows a list of log messages produced in chronological order

Towards the end of the log results window is a button called Show New Logs. By default, it is set to display log results for the past 30 minutes.

Click this button, and it loads new log rows. The latest entries are added based on the selected filters.

You can share a log entry with other team members to view the particular log and context you are looking at. Click on the log you want to share, copy the current URL of your browser, and send it to team members through the medium of your choice.

Logs are streamed. Each log output can be up to 256KB, and each request can log up to 1MB of data in total, with a limit of 256 individual log lines per request. If you exceed the log entry limits, you can only query the most recent logs.

Runtime logs are stored with the following observability limits:

PlanRetention time
Hobby1 hour of logs
Pro1 day of logs
Enterprise3 days of logs

The above limits are applied immediately when upgrading plans. For example, if you upgrade from Hobby to Pro, you will have access to the Pro plan limits, and access historical logs for up to 1 day.

Last updated on January 3, 2025