Runtime API log to debug panel

#1

Hello,

Can you give me an example of how to write to the debug panel (the one in in the interface beside the info one)? I tried to follow the code of the debug node but I could not understand it completely.

To be more clear, I embedded node-red into and express app and want to write some messages from the app to the debug panel.

Thank you in advance!

0 Likes

#2

You can do this using node.warn, but that may not be what you are looking for.

0 Likes

#3

And how can I do it if I don't have access to any of the nodes? So I am inside an express server which embedds node-red and want to show a welcome message let's say before any flow is deployed?

Thank you!

vin., 17 aug. 2018, 16:13 Colin nodered@discoursemail.com a scris:

0 Likes

#4

I said it might not be what you want. It wasn't clear that you wanted to do it before deploying.

0 Likes

#5

@CatalinFetoiu one way to do it is, is by using the log - although, by default the Debug sidebar only shows warning or higher level messages. Assuming you have the RED object (from require('node-red'):

RED.log.warn("Hi there");

To do anything else would be to delve into the internals of Node-RED which are not public apis and subject to change.

And of course that only displays a message at that point in time - there's not guarantee that there is a browser connected at that point in time. If someone opens the editor 2 seconds later, they won't get the message.

0 Likes

#6

Thank you!

That was what I was looking for :slight_smile:

vin., 17 aug. 2018, 17:09 Nick O'Leary nodered@discoursemail.com a scris:

0 Likes