Node Red Logging and Debugging
This guide assumes that you are familiar with the Node Red framework. For your convenience, you can go through the documentation here: Node Red Documentation
Node Red Logging
To configure Node Red internal logging please set the desired logging level for ’node-red’ logger as specified in the logging guide see here.
Node Red Debugging
In order to use the oe-logger in node red flows, and create a new logger for each flow, we introduce a new Node Red node: “oe-logger”.
How to Use oe-logger node
Following are the relevant properties:
Flow Name the name of the logger, typically the name of the flow (default: ’node-red-flow’).
Level the level of log (default: ‘Info’).
Supports: Trace, Debug, Info, Warn, Error, Fatal.
Message property of msg to be logged (default: msg.payload).
The node has one input point and 0 output points.
You can simply connect your desired node’s output to a oe-logger node, as shown in the image below:
After deploying and running the flow, you will be able to see the logs. In order to understand how oe-logger works, you can refer to the oe-logger guide: oe-logger guide
We have seen how to add oe-logger nodes to a flow.