# How print in console from function

**URL:** <https://forum.inductiveautomation.com/t/how-print-in-console-from-function/79460>\
**Category:** Ignition\
**Created:** [September 21, 2023, 4:10pm UTC](https://forum.inductiveautomation.com/t/how-print-in-console-from-function/79460 "2023-09-21T16:10:00Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![marco\_alvarez](https://avatars.discourse-cdn.com/v4/letter/m/9d8465/32.png) [@marco\_alvarez](https://forum.inductiveautomation.com/u/marco_alvarez)\
**Post date:** [September 21, 2023, 4:10pm UTC](https://forum.inductiveautomation.com/t/how-print-in-console-from-function/79460/1 "2023-09-21T16:10:00Z")

</div>

Hi, im trying to debug my code, I want to print something in the console everytime function calculateRoster is called. I try with print "test" / print("test"), but my output console is empty. Im sure the function is being called.

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/2/d/2dffe97016df6ab6bc0fdad8554b6a2526edf770.png)

---

<div class="post-metadata">

**Author:** ![kyler.kamyszek](https://avatars.discourse-cdn.com/v4/letter/k/a4c791/32.png) [@kyler.kamyszek](https://forum.inductiveautomation.com/u/kyler.kamyszek)\
**Post date:** [September 21, 2023, 4:14pm UTC](https://forum.inductiveautomation.com/t/how-print-in-console-from-function/79460/2 "2023-09-21T16:14:28Z")

</div>

Print will always show up in the Wrapper log in the Program files of your Ignition installation folder.

Because this is a pipeline, you really should look into using a logger. Look up system.util.getLogger() and go from there. This will show up on the logs page in Ignition's web interface.

---

<div class="post-metadata">

**Author:** ![bkarabinchak.psi](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/bkarabinchak.psi/32/83567_2.png) [@bkarabinchak.psi](https://forum.inductiveautomation.com/u/bkarabinchak.psi)\
**Post date:** [September 21, 2023, 4:39pm UTC](https://forum.inductiveautomation.com/t/how-print-in-console-from-function/79460/3 "2023-09-21T16:39:58Z")

</div>

Best practice is to never use print in production. The only time I use it now is if I am in script console writing or debugging a specific function, but before that function goes into production, any important print statement should be converted to a `logger.info/error/warn/trace` type of statement.

---

<div class="post-metadata">

**Author:** ![marco\_alvarez](https://avatars.discourse-cdn.com/v4/letter/m/9d8465/32.png) [@marco\_alvarez](https://forum.inductiveautomation.com/u/marco_alvarez)\
**Post date:** [September 21, 2023, 4:58pm UTC](https://forum.inductiveautomation.com/t/how-print-in-console-from-function/79460/4 "2023-09-21T16:58:19Z")

</div>

Thanks, that help. Would be nice to have access to the output console.

---

<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:** [September 21, 2023, 5:10pm UTC](https://forum.inductiveautomation.com/t/how-print-in-console-from-function/79460/5 "2023-09-21T17:10:35Z")

</div>

You can't print to the output console because the execution scope is different. Alarm pipelines are executing on the gateway, not the local machine (like the script console).

> [@Event Configuration Print Out to debug](https://forum.inductiveautomation.com/t/event-configuration-print-out-to-debug/60091/5):
>
> It’s complicated slight_smile 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 ‘Out…
