# Logging from html oneditprepare

**URL:** <https://discourse.nodered.org/t/logging-from-html-oneditprepare/56246>\
**Category:** Developing Nodes\
**Created:** [7 January 2022 10:06 UTC](https://discourse.nodered.org/t/logging-from-html-oneditprepare/56246 "2022-01-07T10:06:12Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Fredrik](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/fredrik/32/107652_2.png) [@Fredrik](https://discourse.nodered.org/u/Fredrik)\
**Post date:** [7 January 2022 10:06 UTC](https://discourse.nodered.org/t/logging-from-html-oneditprepare/56246/1 "2022-01-07T10:06:12Z")

</div>

Hi.

I'd like to be able to log error messages from the oneditprepare function, but I'm having some problems figuring out how. Console.log seems to work but I can't find the message, it doesn't show up in the node-red output. What's the best way to do this?

---

<div class="post-metadata">

**Author:** ![dceejay](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/dceejay/32/38_2.png) [@dceejay](https://discourse.nodered.org/u/dceejay)\
**Post date:** [7 January 2022 10:12 UTC](https://discourse.nodered.org/t/logging-from-html-oneditprepare/56246/2 "2022-01-07T10:12:57Z")

</div>

oneditprepare is running in the browser so will be in the browser tools console. If you really need something back on the server side you would need to setup an endpoint in your .js file and post it back via http.

---

<div class="post-metadata">

**Author:** ![Fredrik](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/fredrik/32/107652_2.png) [@Fredrik](https://discourse.nodered.org/u/Fredrik)\
**Post date:** [7 January 2022 11:13 UTC](https://discourse.nodered.org/t/logging-from-html-oneditprepare/56246/3 "2022-01-07T11:13:31Z")

</div>

Oh I see! Well, that's logical. Thanks!

---

<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:** [21 January 2022 11:13 UTC](https://discourse.nodered.org/t/logging-from-html-oneditprepare/56246/4 "2022-01-21T11:13:58Z")

</div>

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