# Printing To Console

**URL:** <https://forum.inductiveautomation.com/t/printing-to-console/93976>\
**Category:** Ignition\
**Tags:** ignition81, perspective\
**Created:** [July 31, 2024, 1:21pm UTC](https://forum.inductiveautomation.com/t/printing-to-console/93976 "2024-07-31T13:21:07Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![Pat\_Cunningham](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pat_cunningham/32/57710_2.png) [@Pat\_Cunningham](https://forum.inductiveautomation.com/u/Pat_Cunningham)\
**Post date:** [July 31, 2024, 1:21pm UTC](https://forum.inductiveautomation.com/t/printing-to-console/93976/1 "2024-07-31T13:21:07Z")

</div>

I am sure that this a repeat but I cannot find an answer to my question. I use Chrome and show Developer Tools Console and system.perspective.print will print to that console. I would like to print to that console from a script. system.perspective is not an option.

I tried system.uitl.logger but I cannot get that to print anywhere.

---

<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:** [July 31, 2024, 1:24pm UTC](https://forum.inductiveautomation.com/t/printing-to-console/93976/2 "2024-07-31T13:24:08Z")

</div>

In perspective the logger from `system.util.getLogger` is going to the gateway logs.

---

<div class="post-metadata">

**Author:** ![Pat\_Cunningham](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pat_cunningham/32/57710_2.png) [@Pat\_Cunningham](https://forum.inductiveautomation.com/u/Pat_Cunningham)\
**Post date:** [July 31, 2024, 1:25pm UTC](https://forum.inductiveautomation.com/t/printing-to-console/93976/3 "2024-07-31T13:25:04Z")

</div>

I am not getting anything there either.

---

<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:** [July 31, 2024, 1:25pm UTC](https://forum.inductiveautomation.com/t/printing-to-console/93976/4 "2024-07-31T13:25:36Z")

</div>

Show your code. Show where your code is called from.

---

<div class="post-metadata">

**Author:** ![Pat\_Cunningham](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pat_cunningham/32/57710_2.png) [@Pat\_Cunningham](https://forum.inductiveautomation.com/u/Pat_Cunningham)\
**Post date:** [July 31, 2024, 1:40pm UTC](https://forum.inductiveautomation.com/t/printing-to-console/93976/6 "2024-07-31T13:40:09Z")

</div>

Hopefully this makes sense.

Tried info and trace for logger and nothing showed up in gateway logs.  
Also perspective.print is not an option here.  
 ![Screenshot 2024-07-31 093227](https://us1.discourse-cdn.com/inductiveautomation/original/3X/b/0/b0b4eae111052f409ee120aad96b175cbb709231.png)  
 ![Screenshot 2024-07-31 093311](https://us1.discourse-cdn.com/inductiveautomation/original/3X/0/e/0ebd214f44dd7acec017117e8595a022bbd8079a.png)

I can use perspective.print here

 ![Screenshot 2024-07-31 093356](https://us1.discourse-cdn.com/inductiveautomation/original/3X/0/6/06328bb5b2e5f42efc0002252eabddabf63fdddb.png)

---

<div class="post-metadata">

**Author:** ![Pat\_Cunningham](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pat_cunningham/32/57710_2.png) [@Pat\_Cunningham](https://forum.inductiveautomation.com/u/Pat_Cunningham)\
**Post date:** [July 31, 2024, 1:45pm UTC](https://forum.inductiveautomation.com/t/printing-to-console/93976/7 "2024-07-31T13:45:29Z")

</div>

I really just want to be able to print to the Chrome Console from the project library.

---

<div class="post-metadata">

**Author:** ![Ryan\_Deardorff](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/ryan_deardorff/32/63815_2.png) [@Ryan\_Deardorff](https://forum.inductiveautomation.com/u/Ryan_Deardorff)\
**Post date:** [July 31, 2024, 1:56pm UTC](https://forum.inductiveautomation.com/t/printing-to-console/93976/8 "2024-07-31T13:56:54Z")

</div>

Add to the script:

```python
import system.perspective

```

Then you can `system.perspective.print()` so long as the script is invoked from an action on the view.

EDIT: Actually I don't think the import is even necessary, so long as the script is invoked from the view. Invoking from the view is the only way you're going to get access to the browser console.

---

<div class="post-metadata">

**Author:** ![Pat\_Cunningham](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pat_cunningham/32/57710_2.png) [@Pat\_Cunningham](https://forum.inductiveautomation.com/u/Pat_Cunningham)\
**Post date:** [July 31, 2024, 2:04pm UTC](https://forum.inductiveautomation.com/t/printing-to-console/93976/9 "2024-07-31T14:04:30Z")

</div>

Perfect. Thank you. When it didn't "intellisense" I assumed it wasn't available.

---

<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:** [July 31, 2024, 2:39pm UTC](https://forum.inductiveautomation.com/t/printing-to-console/93976/10 "2024-07-31T14:39:58Z")

</div>

If you're in a new-ish version you can change the hint scope in the project library; there's a small drop down in the top right corner.
