You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The Function node will clone every message object you pass to `node.send` to
127
135
ensure there is no unintended modification of message objects that get reused
@@ -139,7 +147,7 @@ node.send(msg,false);
139
147
140
148
#### Finishing with a message
141
149
142
-
**Since Node-RED 1.0**
150
+
*Since Node-RED 1.0*
143
151
144
152
If a Function node does asynchronous work with a message, the runtime will not
145
153
automatically know when it has finished handling the message.
@@ -190,7 +198,6 @@ node.on('close', function() {
190
198
});
191
199
{% endhighlight %}
192
200
193
-
194
201
Or, *since Node-RED 1.1.0*, you can add code to the `Close` tab in the node's edit
195
202
dialog.
196
203
@@ -204,7 +211,11 @@ node.warn("Something happened you should know about");
204
211
node.error("Oh no, something bad happened");
205
212
{% endhighlight %}
206
213
207
-
The `warn` and `error` messages also get sent to the flow editor debug tab.
214
+
Where the console output appears will depend on how your opearting sustem and how you start Node-RED.
215
+
If you start using a command line - that is the console where logging will appear. If you run as a
216
+
system service then it may appear in the system log. If you run under an app like PM2 it will have it's own way for showing logs. On a Pi the install script adds a `node-red-log` command that will display the log.
217
+
218
+
The `warn` and `error` messages also get sent to the debug tab on the right side of the flow editor.
208
219
209
220
For finer grained logging, `node.trace()` and `node.debug()` are also available.
210
221
If there is no logger configured to capture those levels, they will not be seen.
@@ -446,7 +457,7 @@ The following objects are available within the Function node.
446
457
*`global.keys(..)` : return a list of all global-scoped context property keys
447
458
448
459
#### `RED`
449
-
*`RED.util.cloneMessage(..)` : safely clones a message object so it can be reused
460
+
*`RED.util.cloneMessage(..)` : safely clones a message object so it can be reused
0 commit comments