# Scripting Functions Using ScriptManager - Printing/Logging

**URL:** <https://forum.inductiveautomation.com/t/scripting-functions-using-scriptmanager-printing-logging/80980>\
**Category:** Module Development\
**Created:** [October 25, 2023, 6:17pm UTC](https://forum.inductiveautomation.com/t/scripting-functions-using-scriptmanager-printing-logging/80980 "2023-10-25T18:17:23Z")\
**Posts on this page:** 1\
**Showing post:** 2

<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:** [October 25, 2023, 6:55pm UTC](https://forum.inductiveautomation.com/t/scripting-functions-using-scriptmanager-printing-logging/80980/2 "2023-10-25T18:55:55Z")

</div>

This is expected behavior - you'd get the exact same output if you had written that code yourself in 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…

The script console is a bit of a one-off unicorn; it manually "wraps" the `stdout` and `stderr` buffers for code executing inside itself. Logging should be considered a "side channel" for information capture - if you want something to be visible to the caller, your options are to return it directly or write it to `stdout` (which itself has caveats for gateway scope). No free lunch, unfortunately.

---

_[View the full topic](https://forum.inductiveautomation.com/t/scripting-functions-using-scriptmanager-printing-logging/80980)._
