mirror of
https://github.com/node-red/node-red.git
synced 2025-03-01 10:36:34 +00:00
Adding an Object node to the sandbox of a function node
Permit the user of the sandbox to log using the Function Node. Test provided and working. Fix Display warning message in the debug log Before they were displayed as error instead of warning
This commit is contained in:
@@ -39,6 +39,13 @@
|
||||
<p>The message is passed in as a JavaScript object called <code>msg</code>.</p>
|
||||
<p>By convention it will have a <code>msg.payload</code> property containing
|
||||
the body of the message.</p>
|
||||
<p>If your node need to log anything use the <code>node</code> object:
|
||||
<ul>
|
||||
<li>Info: <code>node.log(msg);</code></li>
|
||||
<li>Warning: <code>node.warn(msg);</code></li>
|
||||
<li>Error: <code>node.error(msg);</code></li>
|
||||
</ul>
|
||||
</p>
|
||||
<p>The function should return the messages it wants to pass on to the next nodes
|
||||
in the flow. It can return:</p>
|
||||
<ul>
|
||||
|
Reference in New Issue
Block a user