Netlify provides logs to help you observe and troubleshoot serverless functions in your current published deploy, branch deploys, and Deploy Previews.
# Access function logs
- In the Netlify UI, for your chosen site, go to .
- Select a function from the list to open the log for that function.
By default, the Functions list displays the functions in the current published deploy. To find functions on another deploy, you can use the search field at the top of the list. You can start typing to jump to a particular branch, or find a Deploy Preview by number.
Team Owners and Collaborators can monitor the function logs for a specific deploy by going to the Function logs tab of the Netlify Drawer in a collaborative Deploy Preview.
# Log contents
Netlify displays a log for each function, including:
- Start of each invocation
console.log()statements you include in your function code
- Log statements as each background function is executed
Note that function log retention limits apply and may impact what the Netlify UI displays.
# Date filter
By default, the function log displays a live tail of the latest activity in Real-time. You can also filter to review data from a specific time period, including the Last hour, Last day, Last 7 days, or select Custom to input a specific date and time range.
# Text filter
You can filter the contents of the log with simple text matches on request ID, message, or log level. Some common log levels include:
# Log retention and limits
Logs are retained for at least 24 hours of function activity, even after a new function deployment. This log retention period increases to 7 days for certain pricing plans.
Historical function log output is limited to 4 KB total per invocation. If a log’s output exceeds 4 KB, only the last 4 KB of the log is retained and the log message will be truncated.
# Log Drains
You can connect your function logs to third-party monitoring services for analysis using Netlify’s Log Drains feature. Check out our Log Drains doc for more information.
# Error monitoring
Check out our Sentry Integration to add centralized error monitoring for Netlify Functions, Scheduled Functions, and Background Functions.
Did you find this doc useful?
Your feedback helps us improve our docs.