# Make node.log or RED.log available in the function node

**URL:** <https://discourse.nodered.org/t/make-node-log-or-red-log-available-in-the-function-node/59751>\
**Category:** Feature Requests\
**Created:** [12 March 2022 11:51 UTC](https://discourse.nodered.org/t/make-node-log-or-red-log-available-in-the-function-node/59751 "2022-03-12T11:51:41Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![TotallyInformation](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/totallyinformation/32/31_2.png) [@TotallyInformation](https://discourse.nodered.org/u/TotallyInformation)\
**Post date:** [12 March 2022 11:51 UTC](https://discourse.nodered.org/t/make-node-log-or-red-log-available-in-the-function-node/59751/1 "2022-03-12T11:51:41Z")

</div>

I always find it somewhat jarring to have to use `node.warn` in a function node (or use a second output port and dump a msg) when all I want to do is to get some debug output to the debug panel.

It would be really nice if we could have some kind of simple log feature in the function node that outputs data without it having to show up as a warning or having to output a msg.

Ideally, it would allow multiple arguments that could be of any type similar to how console.log works but just outputting to the debug panel as an object.

---

<div class="post-metadata">

**Author:** ![knolleary](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/knolleary/32/3_2.png) [@knolleary](https://discourse.nodered.org/u/knolleary)\
**Post date:** [12 March 2022 14:30 UTC](https://discourse.nodered.org/t/make-node-log-or-red-log-available-in-the-function-node/59751/2 "2022-03-12T14:30:32Z")

</div>

Previously discussed, without conclusion, here:

> [@clipboard Survey: logging to debug sidebar](https://discourse.nodered.org/t/survey-logging-to-debug-sidebar/21253):
>
> Hi, one of the long-standing quirks of the Function node is that the only way to get a message to appear in the Debug sidebar is to use node.warn or node.error. The problem with this approach is it puts what should be debugging comments into the log at warn/error levels. That is not a good thing for systems that monitor warn/error levels and automatically raise alerts when they happen. The question is: how can we improve this? It isn't a hard problem to solve, but there are a few different wa…

---

<div class="post-metadata">

**Author:** ![Steve-Mcl](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/steve-mcl/32/4826_2.png) [@Steve-Mcl](https://discourse.nodered.org/u/Steve-Mcl)\
**Post date:** [12 March 2022 15:35 UTC](https://discourse.nodered.org/t/make-node-log-or-red-log-available-in-the-function-node/59751/3 "2022-03-12T15:35:17Z")

</div>

Do we think this would overlap / integrate with [trello - 124-debug-add-loglevels](https://trello.com/c/AG9C90iy/124-debug-add-loglevels)

---

<div class="post-metadata">

**Author:** ![TotallyInformation](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/totallyinformation/32/31_2.png) [@TotallyInformation](https://discourse.nodered.org/u/TotallyInformation)\
**Post date:** [12 March 2022 15:48 UTC](https://discourse.nodered.org/t/make-node-log-or-red-log-available-in-the-function-node/59751/4 "2022-03-12T15:48:58Z")

</div>

Well `node.debug` got the majority vote and I certainly don't have strong enough objections to that to make any further waves.

> [@Steve-Mcl](#):
>
> Do we think this would overlap / integrate with

At first sight, it doesn't appear to overlap at all to me?

This is about enhancing the function node whereas that is about enhancing the debug node. And it too feels like it might be a nice enhancement.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/1X/d073cd938eafa2e558d7c2cd59003b3ef4963033.png) [@system](https://discourse.nodered.org/u/system)\
**Post date:** [11 May 2022 15:49 UTC](https://discourse.nodered.org/t/make-node-log-or-red-log-available-in-the-function-node/59751/5 "2022-05-11T15:49:21Z")

</div>

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.
