# Node.debug in function node code

**URL:** <https://discourse.nodered.org/t/node-debug-in-function-node-code/29825>\
**Category:** General\
**Created:** [10 July 2020 06:58 UTC](https://discourse.nodered.org/t/node-debug-in-function-node-code/29825 "2020-07-10T06:58:21Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![michaelblight](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/michaelblight/32/445_2.png) [@michaelblight](https://discourse.nodered.org/u/michaelblight)\
**Post date:** [10 July 2020 07:12 UTC](https://discourse.nodered.org/t/node-debug-in-function-node-code/29825/2 "2020-07-10T07:12:43Z")

</div>

`node.debug("Hello")` works for me in a function node. Although in `settings.js` my debugging level is set to the default of "info", so it is basically ignored. Using `node.warn("Hello")` shows up in the log and the debug tab in the editor. The same settings file shows the hierarchy of log messages as below. Since "warn" is above the setting of "info", it will be included, but "debug" is below, so it will not. Either way, I don't get an error. Can you show your actual code?

```auto
            // Level of logging to be recorded. Options are:
            // fatal - only those errors which make the application unusable should be recorded
            // error - record errors which are deemed fatal for a particular request + fatal errors
            // warn - record problems which are non fatal + errors + fatal errors
            // info - record information about the general running of the application + warn + error + fatal erro$
            // debug - record information which is more verbose than info + info + warn + error + fatal errors
            // trace - record very detailed logging + debug + info + warn + error + fatal errors
            // off - turn off all logging (doesn't affect metrics or audit)

```

---

_[View the full topic](https://discourse.nodered.org/t/node-debug-in-function-node-code/29825)._
