Overview
This node acts as a flexible logger within n8n workflows. It allows you to log either arbitrary data or the output of the previous node, with customizable log levels and an associated unique identifier (GUUID). This is useful for debugging, auditing, or tracking workflow execution by recording structured information at various points in your automation.
Common scenarios:
- Debugging workflow steps by logging intermediate data.
- Recording errors or warnings with context for later analysis.
- Auditing workflow runs by associating logs with unique identifiers.
Practical examples:
- Log the result of a data transformation step for troubleshooting.
- Record incoming webhook payloads for monitoring.
- Track errors with detailed context during workflow execution.
Properties
| Name | Meaning |
|---|---|
| Type | Select what to log: - Node: Log the result of the last node. - Data: Log any custom data provided in the "Data" property. |
| GUUID | A required unique identifier (string) to associate with the log entry. Typically used to track or correlate logs across workflow executions. |
| Level | The severity level of the log entry: - Debug - Info - Warning - Error - Fatal - Trace |
| Data | (Visible only if Type = Data) The JSON data to be logged. This can be any structured information relevant to your workflow. |
Output
The node outputs a single JSON object with the following structure:
{
"workflowId": "<ID of the current workflow>",
"guuid": "<Value from the GUUID property>",
"context": <Current node context>,
"data": <Logged data: either the 'Data' property value or the previous node's output>
}
- workflowId: The ID of the workflow where the log was generated.
- guuid: The unique identifier provided in the input.
- context: The current node's context object.
- data: The actual data being logged (either user-provided or from the previous node).
Dependencies
- No external services or API keys are required.
- Uses the
pinolibrary internally for logging, but this is bundled and does not require user configuration. - No special n8n environment variables or credentials are needed.
Troubleshooting
Common issues:
- Missing required fields: If "GUUID" or "Data" (when Type is "Data") are not provided, the node may throw validation errors.
- Invalid JSON in Data: If the "Data" property contains malformed JSON, the node will fail to execute.
- Incorrect log level: Providing an invalid value for "Level" will result in an error.
Error messages and resolutions:
- "Parameter 'guuid' is required" — Ensure you provide a value for the GUUID field.
- "Parameter 'data' is required" (when Type is "Data") — Make sure to enter valid JSON data.
- "Unknown log level" — Use one of the allowed options: Debug, Info, Warning, Error, Fatal, Trace.