Logger icon

Logger

Print a LogOutput either in the Logs or the Developer Tools Console

Overview

The Logger node is a utility/helper for logging and debugging within n8n workflows. It allows users to print information about the items passing through the workflow, including metadata such as timestamps, item counts, and custom descriptions. The output can be formatted as JSON or as a table, and can be directed to the browser console (frontend), server logs (backend), or both. This node is especially useful for workflow development, troubleshooting, and monitoring data transformations.

Practical examples:

  • Debugging: Print incoming data at various points in your workflow to verify transformations.
  • Monitoring: Log the number of items processed and their content for audit trails.
  • Development: Output intermediate results to quickly inspect workflow behavior.

Properties

Name Type Meaning
PrintTarget options Where to print the log: UIOnly (browser console), ServerOnly (server logs), or Both.
Print DateTime boolean Whether to include a timestamp in the log output.
Print Items Count boolean Whether to include the count of input items in the log.
Description string A custom description/title to include in the log output.
Output Data boolean Whether to include the actual input data in the log output.
Output Type options Format for outputting data: JSON or Table (only shown if Output Data is true).
Meta Data boolean If enabled (and Output Type is JSON), includes full item metadata instead of just json.
Fill with Spaces boolean If enabled (and Output Type is Table), pads table cells with spaces for alignment.

Output

  • The node passes through the original input items unchanged ([a]).
  • No new fields are added to the json property of items.
  • The main effect is side-effectual: printing/logging data to the selected target(s).

Note:
If "Output Data" is enabled, the log will contain either:

  • A JSON array of item data (either just the json field or the entire item object, depending on "Meta Data").
  • A table-formatted string representation of the items.

No binary data is produced by this node.

Dependencies

  • No external services or API keys required.
  • Relies on n8n's internal logging and messaging mechanisms.
  • Uses a bundled dependency (TableBuilder) for formatting tables.

Troubleshooting

Common issues:

  • Nothing appears in the UI: Ensure "PrintTarget" is set to "UIOnly" or "Both". For "UIOnly", check the browser developer console.
  • Nothing appears in server logs: Ensure "PrintTarget" is set to "ServerOnly" or "Both". Check the n8n process logs.
  • Unexpected output format: Double-check "Output Type" and related options ("Meta Data", "Fill with Spaces").
  • Large data sets: Logging very large arrays may cause performance issues or truncated output in some consoles.

Error messages:

  • This node does not throw custom errors; any errors would likely be from misconfiguration or upstream nodes.

Links and References

Discussion