Skip to main content
Skip table of contents

Logging from your flow

Logging is an essential practice when developing a flow, as it provides you with insights into the flow's operation and helps identify issues early. Here’s why it’s beneficial:

  1. Troubleshooting and Debugging: Logging allows you to track the data moving through the flow, making it easier to pinpoint issues when something doesn’t work as expected. For example, by using the debug node or logging within the function node, you can observe variable values and identify errors in real time.

  2. Error Tracking: Errors can be challenging to detect without proper logging. Logging key events and errors enables developers to see where flows fail and understand the cause, which is especially valuable for flows involving multiple nodes or complex logic.

  3. Performance Monitoring: Logs can help detect bottlenecks by showing how long certain parts of the flow take to execute. Developers can optimize the flow based on this information to improve performance.

  4. Traceability: When working in a team or on long-term projects, logs provide a trail of what occurred at different stages, which can be especially helpful when troubleshooting production issues or understanding flow behavior over time.

  5. Maintaining Flow Health: Regularly checking log outputs helps developers maintain the health of their flows by catching potential issues before they escalate, ensuring a smoother, more reliable application.

Using logging effectively in your flows not only aids development but also contributes to a more stable and maintainable flow.

Get additional insights with Run History
Besides logging, qibb offers another way to monitor each step of your flow:
Discover more with Run History.

Log Levels

Your flow will generate various log records during operation. These can include system activities, such as booting, starting or stopping flows, installing or updating nodes, as well as logs from individual nodes while the flow is being triggered and processed.

Those messages are categorized in levels, including:

Log Level

Purpose

ERROR

  • Indicates a failure in the flow or system processes that requires immediate attention.

WARN

  • Highlights potential issues that could become problematic.

INFO

  • Provides general information about the flow and operational status.

DEBUG

  • Offers detailed diagnostic information useful for troubleshooting during development. This log level is reserved for system processes only.

AUDIT

  • Records security-relevant or compliance events to track user access of the flow.

  • This log level is reserved for system processes only.

How to inspect logs

To inspect a flow's logs, you have two options:

  1. Debug Sidebar in the Flow Editor: Ideal for viewing logs during flow development. Note that only the latest logs are displayed here.

  2. Space Logs in the Portal: Offers filtering and search options to navigate the log history over defined time ranges. For more information, see Efficient debugging with Log Browser.

Automatic Sensitive Data Redaction
Sensitive data is automatically redacted in both the Debug Sidebar output and collected logs. This feature ensures that secrets stored in the Secret Manager, as well as sensitive HTTP headers (such as Authorization, Cookie, X-API-Key, and more), are masked to protect security.

Learn more about Secret Redaction.

How to log messages from your flow

You can easily log messages from your flow, using either the Function node or Debug node.

  • With the Function node, you can log on the INFO, WARN or ERROR level using a JavaScript command.

  • With the Debug node, you can log on the INFO level.

Log Level

Log via Function node

Log via Debug node

Output

ERROR

(tick) Supported

Use the following code to log on this level:

node.error("Example ERROR message logged via function node");

You can also use the node.error function to throw a catchable error while passing the msg object. This will trigger a "catch" node (see Catchable Errors) if one exists in the flow:
node.error("Example error message logged via debug node", msg);

(minus) Not supported

  • Logs Tab of Space

  • Debug Sidebar in Flow Editor

WARN

(tick) Supported

Use the following code to log on this level:

node.warn("Example WARN message logged via function node");

(minus) Not supported

  • Logs Tab of Space

  • Debug Sidebar in Flow Editor

INFO

(tick) Supported

Use the following code to log on this level:

node.log("Example INFO message logged via function node");

(tick) Supported

  • Ensure “system console” is ticked when the log should be visible in Logs Tab of Space.

  • Ensure “debug window” is ticked when the log should be visible in Debug Sidebar in Flow Editor.

  • Logs Tab of Space

  • Debug Sidebar in Flow Editor

DEBUG

(minus) Not supported

(Reserved to system processes)

(minus) Not supported

(Reserved to system processes)

  • Logs Tab of Space

AUDIT

(minus) Not supported

(Reserved to system processes)

(minus) Not supported

(Reserved to system processes)

  • Logs Tab of Space

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.