# Show logger in a perspective view

**URL:** <https://forum.inductiveautomation.com/t/show-logger-in-a-perspective-view/33320>\
**Category:** Ignition\
**Tags:** perspective\
**Created:** [March 23, 2020, 2:46pm UTC](https://forum.inductiveautomation.com/t/show-logger-in-a-perspective-view/33320 "2020-03-23T14:46:51Z")\
**Posts on this page:** 12\
**Page:** 1

<div class="post-metadata">

**Author:** ![victor1](https://avatars.discourse-cdn.com/v4/letter/v/6de8d8/32.png) [@victor1](https://forum.inductiveautomation.com/u/victor1)\
**Post date:** [March 23, 2020, 2:46pm UTC](https://forum.inductiveautomation.com/t/show-logger-in-a-perspective-view/33320/1 "2020-03-23T14:46:51Z")

</div>

Hi!  
There is a way to show the ignition logs in a perspective view?  
To allow my clients to view some logs directly in the perspective without having to open the gateway page?

Thanks

thanks

---

<div class="post-metadata">

**Author:** ![Janis\_Voss](https://avatars.discourse-cdn.com/v4/letter/j/51bf81/32.png) [@Janis\_Voss](https://forum.inductiveautomation.com/u/Janis_Voss)\
**Post date:** [October 20, 2023, 7:26am UTC](https://forum.inductiveautomation.com/t/show-logger-in-a-perspective-view/33320/2 "2023-10-20T07:26:41Z")

</div>

Hey,  
did you find a solution for that?

---

<div class="post-metadata">

**Author:** ![victor1](https://avatars.discourse-cdn.com/v4/letter/v/6de8d8/32.png) [@victor1](https://forum.inductiveautomation.com/u/victor1)\
**Post date:** [October 23, 2023, 10:23am UTC](https://forum.inductiveautomation.com/t/show-logger-in-a-perspective-view/33320/3 "2023-10-23T10:23:01Z")

</div>

Hi,

No. I am saving the logs in a database table and showing in a perspective table.

---

<div class="post-metadata">

**Author:** ![weixionglichina](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/weixionglichina/32/10650_2.png) [@weixionglichina](https://forum.inductiveautomation.com/u/weixionglichina)\
**Post date:** [October 23, 2023, 11:19am UTC](https://forum.inductiveautomation.com/t/show-logger-in-a-perspective-view/33320/4 "2023-10-23T11:19:08Z")

</div>

You can do by sqllite driver

---

<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:** [October 23, 2023, 11:37am UTC](https://forum.inductiveautomation.com/t/show-logger-in-a-perspective-view/33320/5 "2023-10-23T11:37:47Z")

</div>

> [@weixionglichina](#):
>
> do by sqllite

Not safe. SQLite is single-process and single-threaded. Using it to open the logging system's SQLite file at the same time will likely corrupt it, or will block logging from happening. Don't do it.

---

<div class="post-metadata">

**Author:** ![nminchin](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/nminchin/32/6911_2.png) [@nminchin](https://forum.inductiveautomation.com/u/nminchin)\
**Post date:** [October 23, 2023, 1:02pm UTC](https://forum.inductiveautomation.com/t/show-logger-in-a-perspective-view/33320/6 "2023-10-23T13:02:08Z")

</div>

You can also show the wrapper log within a text area component. It's far less convenient to read it and there's no filtering available, but it works

---

<div class="post-metadata">

**Author:** ![Pappu\_Gupta](https://avatars.discourse-cdn.com/v4/letter/p/bbce88/32.png) [@Pappu\_Gupta](https://forum.inductiveautomation.com/u/Pappu_Gupta)\
**Post date:** [October 25, 2023, 2:02pm UTC](https://forum.inductiveautomation.com/t/show-logger-in-a-perspective-view/33320/7 "2023-10-25T14:02:50Z")

</div>

Can u mentioned the steps how to do it.

---

<div class="post-metadata">

**Author:** ![Pappu\_Gupta](https://avatars.discourse-cdn.com/v4/letter/p/bbce88/32.png) [@Pappu\_Gupta](https://forum.inductiveautomation.com/u/Pappu_Gupta)\
**Post date:** [October 25, 2023, 2:06pm UTC](https://forum.inductiveautomation.com/t/show-logger-in-a-perspective-view/33320/8 "2023-10-25T14:06:08Z")

</div>

Hi,  
Can you mentioned the steps how to save logs in database.

---

<div class="post-metadata">

**Author:** ![Janis\_Voss](https://avatars.discourse-cdn.com/v4/letter/j/51bf81/32.png) [@Janis\_Voss](https://forum.inductiveautomation.com/u/Janis_Voss)\
**Post date:** [October 27, 2023, 12:42pm UTC](https://forum.inductiveautomation.com/t/show-logger-in-a-perspective-view/33320/9 "2023-10-27T12:42:46Z")

</div>

Thanks for the answers 🙂

---

<div class="post-metadata">

**Author:** ![victor1](https://avatars.discourse-cdn.com/v4/letter/v/6de8d8/32.png) [@victor1](https://forum.inductiveautomation.com/u/victor1)\
**Post date:** [October 30, 2023, 10:26am UTC](https://forum.inductiveautomation.com/t/show-logger-in-a-perspective-view/33320/10 "2023-10-30T10:26:04Z")

</div>

I created a table in a database. Like this:  
 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/9/b/9bd73daf5674e29dd281ebf0c77b78393e51412a.png)

So I created a gateway event message handler:

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

Anywhere in the project a I can send a message to create a log:

```auto
system.util.sendMessage('PROJECT', 'Error_Handler', {'estacao': 'A400-63B', 'msg': 'QRCode ' + qrcode + ' ja cadastrado e OK'})

```

Thus, in a perspective table, the contents of the table are shown

---

<div class="post-metadata">

**Author:** ![Learner\_Ignition](https://avatars.discourse-cdn.com/v4/letter/l/b3f665/32.png) [@Learner\_Ignition](https://forum.inductiveautomation.com/u/Learner_Ignition)\
**Post date:** [October 30, 2023, 10:42am UTC](https://forum.inductiveautomation.com/t/show-logger-in-a-perspective-view/33320/11 "2023-10-30T10:42:10Z")

</div>

Hi,  
Do you mean that Wrapper.log can be view in Perspective?  
If yes can you provide more details

---

<div class="post-metadata">

**Author:** ![nminchin](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/nminchin/32/6911_2.png) [@nminchin](https://forum.inductiveautomation.com/u/nminchin)\
**Post date:** [October 30, 2023, 10:44am UTC](https://forum.inductiveautomation.com/t/show-logger-in-a-perspective-view/33320/12 "2023-10-30T10:44:52Z")

</div>

Wrapper.log\* yes it can.  
Reference this post below to get the ignition log directory dynamically, then you can read the log file in using system.file.readAsString (from memory)

> [@List of bindings on a property](https://forum.inductiveautomation.com/t/list-of-bindings-on-a-property/67345/8):
>
> This script will get you the file path to the Ignition projects directory: from com.inductiveautomation.ignition.gateway import IgnitionGateway context = IgnitionGateway.get() projectParentFolder = str(context.systemManager.dataDir.absoluteFile).replace('\\','/') + '/projects/' From there, you should be able to traverse the structure to find your View and read its view.json file, interpret it as json with system.util.jsonDecode, and find your bindings. Note, this will only run in the gateway …
