# Event Configuration Print Out to debug

**URL:** <https://forum.inductiveautomation.com/t/event-configuration-print-out-to-debug/60091>\
**Category:** Ignition\
**Created:** [May 26, 2022, 7:51pm UTC](https://forum.inductiveautomation.com/t/event-configuration-print-out-to-debug/60091 "2022-05-26T19:51:02Z")\
**Posts on this page:** 1\
**Showing post:** 5

<div class="post-metadata">

**Author:** ![paul-griffith](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/paul-griffith/32/37249_2.png) [@paul-griffith](https://forum.inductiveautomation.com/u/paul-griffith)\
**Post date:** [May 26, 2022, 9:07pm UTC](https://forum.inductiveautomation.com/t/event-configuration-print-out-to-debug/60091/5 "2022-05-26T21:07:24Z")

</div>

It's complicated 🙂

Starting from most local to least...  
In the script console,

- `print` will log directly to the output buffer on the right hand side.
- `system.util.getLogger()` will log to the named 'Output Console' Designer window.

Bonus: A script invoked from here using `system.util.invokeAsync` will `print` to the regular output console, not the buffer on the right hand side.

Anywhere else in the designer (except Perspective),

- `print` and
- `system.util.getLogger` will log to the 'Output Console' (which is technically also `STDOUT` and `STDERR` for the designer process).

The same applies to a Vision client.

Anywhere _in Perspective_ in the Designer, your script is _actually_ being run on the gateway.  
Therefore,

- `print` will go to the `wrapper.log` of the gateway.
- `system.util.getLogger()` will go to the log file of the gateway _and_ the `wrapper.log`.
- `system.perspective.print` will log to the 'Output Console'.

For extra confusion, we deliberately catch certain errors from scripting and forward them to the designer _and don't log them on the gateway_, so sometimes errors from a design session will appear to be "designer local" when they're really not.

In a script actually executing on the gateway (including gateway event scripts, tag event scripts, SFCs, alarm pipeline scripts, reporting scripts, and anything else I'm forgetting),

- `print` goes to the wrapper log
- `system.util.getLogger` goes to the system logs and the wrapper log
- `system.perspective.print` won't work (unless you manually specify a Perspective session ID, at which point you probably already know what you're doing 🙂)

In a script executing _inside of a Perspective session_,

- `print` goes to the wrapper log
- `system.util.getLogger` goes to the system logs and the wrapper log
- `system.perspective.print` has a 'scope' argument. If unspecified or set to 'client', output will be sent to the _browser console_ wherever the session is running, and _not logged to the gateway_. If scope is set to 'gateway', then output is logged...to the gateway.

And I think that's about all of the possibilities covered.

# EDIT:

This information now lives in the user manual!

> **[Script Logging and Print Statement Output Reference | Ignition User Manual](https://www.docs.inductiveautomation.com/docs/8.1/platform/scripting/scripting-in-ignition/script-logging-print-statement-output)**
>
> Just as each script has its own events based on location that trigger the script to run, output logging is also dependent on where the script is executed. This page details where to find your print statements and logs to assist with script testing...

---

_[View the full topic](https://forum.inductiveautomation.com/t/event-configuration-print-out-to-debug/60091)._
