# Best way to print values from Gateway Event Scipt for debugging purposes

**URL:** <https://forum.inductiveautomation.com/t/best-way-to-print-values-from-gateway-event-scipt-for-debugging-purposes/92049>\
**Category:** Ignition\
**Tags:** scripting, perspective\
**Created:** [June 18, 2024, 8:29pm UTC](https://forum.inductiveautomation.com/t/best-way-to-print-values-from-gateway-event-scipt-for-debugging-purposes/92049 "2024-06-18T20:29:09Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Matthew\_Karee](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/matthew_karee/32/63956_2.png) [@Matthew\_Karee](https://forum.inductiveautomation.com/u/Matthew_Karee)\
**Post date:** [June 18, 2024, 8:29pm UTC](https://forum.inductiveautomation.com/t/best-way-to-print-values-from-gateway-event-scipt-for-debugging-purposes/92049/1 "2024-06-18T20:29:10Z")

</div>

I'm debugging a Gateway Tag Change Script and need to print some intermediary values from my program.

Which console or log would be easiest to do this in? What is the syntax?

---

<div class="post-metadata">

**Author:** ![michael.flagler](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/michael.flagler/32/26272_2.png) [@michael.flagler](https://forum.inductiveautomation.com/u/michael.flagler)\
**Post date:** [June 18, 2024, 8:31pm UTC](https://forum.inductiveautomation.com/t/best-way-to-print-values-from-gateway-event-scipt-for-debugging-purposes/92049/2 "2024-06-18T20:31:14Z")

</div>

You'll print to the gateway logger that you can view from the gateway web interface:

> **[system.util.getLogger | Ignition User Manual](https://www.docs.inductiveautomation.com/docs/8.1/appendix/scripting-functions/system-util/system-util-getLogger)**
>
> Returns a Logger object that can be used to log messages to the console.

---

<div class="post-metadata">

**Author:** ![Matthew\_Karee](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/matthew_karee/32/63956_2.png) [@Matthew\_Karee](https://forum.inductiveautomation.com/u/Matthew_Karee)\
**Post date:** [June 18, 2024, 8:48pm UTC](https://forum.inductiveautomation.com/t/best-way-to-print-values-from-gateway-event-scipt-for-debugging-purposes/92049/3 "2024-06-18T20:48:38Z")

</div>

Thank you. Does this method allow you to print numbers (integers or floats) to the log?

---

<div class="post-metadata">

**Author:** ![Bushmatic](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/bushmatic/32/87014_2.png) [@Bushmatic](https://forum.inductiveautomation.com/u/Bushmatic)\
**Post date:** [June 18, 2024, 9:09pm UTC](https://forum.inductiveautomation.com/t/best-way-to-print-values-from-gateway-event-scipt-for-debugging-purposes/92049/4 "2024-06-18T21:09:12Z")

</div>

Yes. Take a look at some of the examples on the page that @michael.flagler linked. You can use either Python's or Java's formatting syntax to inject pretty much anything into the log message.
