# How to get the debug print result from a gateway scheduled event

**URL:** <https://forum.inductiveautomation.com/t/how-to-get-the-debug-print-result-from-a-gateway-scheduled-event/86311>\
**Category:** Ignition\
**Tags:** scripting\
**Created:** [February 24, 2024, 4:57pm UTC](https://forum.inductiveautomation.com/t/how-to-get-the-debug-print-result-from-a-gateway-scheduled-event/86311 "2024-02-24T16:57:12Z")\
**Posts on this page:** 7\
**Page:** 2

<div class="post-metadata">

**Author:** ![Robert\_Reed](https://avatars.discourse-cdn.com/v4/letter/r/43a26b/32.png) [@Robert\_Reed](https://forum.inductiveautomation.com/u/Robert_Reed)\
**Post date:** [December 13, 2024, 9:20pm UTC](https://forum.inductiveautomation.com/t/how-to-get-the-debug-print-result-from-a-gateway-scheduled-event/86311/21 "2024-12-13T21:20:04Z")

</div>

Script is now

Logger = system.util.getLogger("myLogger")  
Logger.info("Hello")

---

<div class="post-metadata">

**Author:** ![Transistor](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/transistor/32/3380_2.png) [@Transistor](https://forum.inductiveautomation.com/u/Transistor)\
**Post date:** [December 14, 2024, 1:53am UTC](https://forum.inductiveautomation.com/t/how-to-get-the-debug-print-result-from-a-gateway-scheduled-event/86311/22 "2024-12-14T01:53:16Z")

</div>

Welcome to the forum, Robert. Please see [Wiki - how to post code on this forum](https://forum.inductiveautomation.com/t/wiki-how-to-post-code-on-this-forum/77831).

---

<div class="post-metadata">

**Author:** ![Chris\_Bingham](https://avatars.discourse-cdn.com/v4/letter/c/e5b9ba/32.png) [@Chris\_Bingham](https://forum.inductiveautomation.com/u/Chris_Bingham)\
**Post date:** [December 14, 2024, 9:16pm UTC](https://forum.inductiveautomation.com/t/how-to-get-the-debug-print-result-from-a-gateway-scheduled-event/86311/23 "2024-12-14T21:16:54Z")

</div>

If you run these two lines from the script console within Designer, do you see any entries appear in ~~Gateway Webpage @ Status --\> Diagnostics --\> Logs~~ Designer Console @ Tools --\> Console?  
Edit to correct logging destination.

---

<div class="post-metadata">

**Author:** ![pturmel](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pturmel/32/3295_2.png) [@pturmel](https://forum.inductiveautomation.com/u/pturmel)\
**Post date:** [December 14, 2024, 9:35pm UTC](https://forum.inductiveautomation.com/t/how-to-get-the-debug-print-result-from-a-gateway-scheduled-event/86311/24 "2024-12-14T21:35:18Z")

</div>

> [@Chris\_Bingham](#):
>
> two lines from the script console within Designer, do you see any entries appear in Gateway

You shouldn't. Designer logs to its own console.

---

<div class="post-metadata">

**Author:** ![Chris\_Bingham](https://avatars.discourse-cdn.com/v4/letter/c/e5b9ba/32.png) [@Chris\_Bingham](https://forum.inductiveautomation.com/u/Chris_Bingham)\
**Post date:** [December 14, 2024, 10:56pm UTC](https://forum.inductiveautomation.com/t/how-to-get-the-debug-print-result-from-a-gateway-scheduled-event/86311/25 "2024-12-14T22:56:53Z")

</div>

....these two lines...

> [@Robert\_Reed](#):
>
> Logger = system.util.getLogger("myLogger")  
> Logger.info("Hello")

...should always output to logger, no matter the context... no?

---

<div class="post-metadata">

**Author:** ![pturmel](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pturmel/32/3295_2.png) [@pturmel](https://forum.inductiveautomation.com/u/pturmel)\
**Post date:** [December 14, 2024, 11:29pm UTC](https://forum.inductiveautomation.com/t/how-to-get-the-debug-print-result-from-a-gateway-scheduled-event/86311/26 "2024-12-14T23:29:53Z")

</div>

> [@Chris\_Bingham](#):
>
> no?

No.

The designer script console is a variant of Vision Client Context, which logs and prints locally, just like Vision. The designer, and Vision, are separate JVMs from the gateway, and printing/logging is per JVM.

---

<div class="post-metadata">

**Author:** ![Chris\_Bingham](https://avatars.discourse-cdn.com/v4/letter/c/e5b9ba/32.png) [@Chris\_Bingham](https://forum.inductiveautomation.com/u/Chris_Bingham)\
**Post date:** [December 15, 2024, 4:39am UTC](https://forum.inductiveautomation.com/t/how-to-get-the-debug-print-result-from-a-gateway-scheduled-event/86311/27 "2024-12-15T04:39:03Z")

</div>

Sorry for the misinformation...  
Thanks for setting me straight, @pturmel. 🍻 Will edit my post above.  
From the [system.util.getLogger](https://www.docs.inductiveautomation.com/docs/8.1/appendix/scripting-functions/system-util/system-util-getLogger#description) docs:

> Log messages generated from this function are always sent to the calling scope's console.
> 
> - Designer - [Designer Console](https://www.docs.inductiveautomation.com/docs/8.1/platform/designer/designer-diagnostics#console-tab)
> - Vision - Vision Client Console: Help menu \> Diagnostics \> Console tab
> - Perspective and Gateway - Gateway's [Diagnostic Logs](https://www.docs.inductiveautomation.com/docs/8.1/platform/gateway/status/diagnostics-logs) page.

[Previous page](https://forum.inductiveautomation.com/t/how-to-get-the-debug-print-result-from-a-gateway-scheduled-event/86311.md?page=1)
