Log Analysis
Preliminary Description
Note:
EdgeOne Pages currently supports viewing log details for Node Functions, and will gradually support logs from other services such as Edge Functions.
Node Functions Logs
Pages log analytics automatically collects, stores, filters, and analyzes log data sent by Node Functions. You can query the data of each function request in the console and customize the time range for log search. Currently, it supports viewing all logs, call success, call failed, and call timeout logs.
Console Search Logs
1. Log in to the Pages console
2. Select a project that includes Node Functions
3. Switch to "Log Analysis"
4. Retrieve target logs by status, time period, and keyword

Searching Function Log
You can view basic log information of function calls and quickly detect and resolve exceptions or errors in API calls.
Time Filtering
By default, the log list displays information of related requests in the most recent 15 minutes. You can also filter and view data for a specific period, including the past 15 minutes, past hour, past 6 hours, past 12 hours, past 24 hours, or select custom to manually input a specific time range within 24 hours.
Text Filtering
You can use simple text matching to filter log content, such as request ID or log keyword. Or filter by log status, current filter criteria include: call succeeded, call failed, call timeout.
Custom Log
By default, Node Functions send call logs with detailed information about requests, responses, and relevant metadata. You can also add custom logs throughout your code. All content in console.log will display in Node Functions logs.
The following example shows custom logs with console.log in a request handler.
export const onRequestGet = async ({ request }) => {const info = {nodeVersion: process.version,pid: process.pid,platform: os.platform(),arch: os.arch(),cpus: os.cpus()?.length ?? 0,totalMem: os.totalmem(),freeMem: os.freemem(),uptimeSec: process.uptime(),randomUUID: randomUUID(),now: new Date().toISOString(),url: request.url,}console.log('=====info=====', info); // Custom Logreturn new Response(JSON.stringify(info), {status: 200,headers: { 'Content-Type': 'application/json; charset=UTF-8' },})}

Log Structure Description
Each function request log records platform logs marking request start, request end, request error, function return information, and request execution status. User logs are encapsulated between request start and end. The log structure is as follows:
Log Detail | Log Type | Content Meaning |
START RequestId:09c346d3-8417-49c5-8569-xxxxxxxxxxxx | platform log | Tag request started. |
init log | user log | During function initialization, the user log content is printed. The container executes initialization logic only in cold startup scenarios, with no initialization log output in non-cold startup scenarios. |
Init Report RequestId: 09c346d3-8417-49c5-8569-xxxxxxxxxxxx Coldstart: 236ms (PullCode: 70ms InitRuntime: 8ms InitFunction: 158ms) Memory: 640MB MemUsage: 57.86MB | platform log | Initialization execution log. Coldstart indicates the total time consumed in the initialization phase. Among them, PullCode represents the time consumed to pull user functions and layer code or pull images during initialization. InitRuntime indicates the platform time consumed in the initialization phase. InitFunction shows the execution time of user code during initialization. Memory refers to the function configuration memory. MemUsage indicates the run memory during initialization. The container executes initialization logic only in cold startup scenarios, with no initialization log output in non-cold startup scenarios. |
invoke log | user log | User log content printed during the function invocation phase. |
ERROR RequestId:09c346d3-8417-49c5-8569-xxxxxxxxxxxx Result:xxx | platform log | Function error reason. No ERROR log is generated during normal function execution. |
Response RequestId:09c346d3-8417-49c5-8569-xxxxxxxxxxxx RetMsg:"Hello World" | platform log | Function return information is recorded in RetMsg. |
END RequestId:09c346d3-8417-49c5-8569-xxxxxxxxxxxx | platform log | Tag request ended. |
Report RequestId:09c346d3-8417-49c5-8569-c55033b17f51 Duration:1ms Memory:128MB MemUsage:29.734375MB | platform log | Function call execution log. Duration is the function execution duration. Memory is the function configuration memory. MemUsage is the run memory during function execution. |
Log Retention and Limitation
Platform default only retains logs within 24 hours.
The maximum limit for a single log is 5 MB. Logs exceeding this size will be truncated, generally the message field is truncated.