Overview
This node streams log messages using the Winston logging library. It allows users to specify the log level, format, and message content for each input item. The node is useful for debugging workflows by outputting custom log messages or the JSON representation of incoming data at various severity levels. For example, it can be used to log errors, warnings, informational messages, or debug details during workflow execution.
Properties
Name | Meaning |
---|---|
Log Level | The severity level of the log message to stream. Options: Error, Warn, Info, Debug |
Log Format | The format of the log output. Options: Simple (plain text), JSON |
Log Message | The message to log. If empty, the node logs the JSON stringified input data instead |
Output
The node outputs the original input items unchanged in its json
output field. It does not modify or add any new fields to the output data. The primary function is side-effect logging rather than transforming data.
Dependencies
- Uses the Winston logging library internally for log streaming.
- No external API keys or services are required.
- No special n8n environment variables or credentials needed.
Troubleshooting
- Empty Log Messages: If the "Log Message" property is left empty, the node logs the entire input item's JSON string. This may produce very verbose logs if input data is large.
- Invalid Log Level or Format: The node uses fixed options for log level and format; selecting unsupported values is prevented by the UI.
- Logging Errors: If an error occurs during logging, the node throws a descriptive error indicating the item index causing the issue.
- Console Output Visibility: Logs are streamed to the console where n8n runs; ensure you have access to these logs to see the output.