console methods in Node.js. Use console.log(), console.warn(), and console.error() to log messages during function execution. All logs are captured and displayed in the logs page page with metadata about each invocation.
Log Format
Each log entry includes:| Field | Description |
|---|---|
log | The actual log message |
path | The function path that generated the log |
invocationId | Unique identifier for this function invocation |
level | Log level: INFO, WARN, or ERROR |
Execution Metrics
Each function execution also generates a metrics log entry with performance data:Correlating Logs
Invocation ID
TheinvocationId is unique to each function invocation and helps correlate all logs from the same execution. Access it in your code via:
Request ID
You can pass a customx-request-id header from the client for tracing requests across services:
The
invocationId and request ID serve different purposes:- invocationId: Internal identifier for the function execution
- x-request-id: External identifier for tracing requests across services (can be set by the client)