# Beginner question; gateway script logger not working?

**URL:** <https://forum.inductiveautomation.com/t/beginner-question-gateway-script-logger-not-working/39125>\
**Category:** Ignition\
**Created:** [September 28, 2020, 5:04pm UTC](https://forum.inductiveautomation.com/t/beginner-question-gateway-script-logger-not-working/39125 "2020-09-28T17:04:37Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![andonalerts](https://avatars.discourse-cdn.com/v4/letter/a/df788c/32.png) [@andonalerts](https://forum.inductiveautomation.com/u/andonalerts)\
**Post date:** [September 28, 2020, 5:04pm UTC](https://forum.inductiveautomation.com/t/beginner-question-gateway-script-logger-not-working/39125/1 "2020-09-28T17:04:37Z")

</div>

I have a tag change script which works and logs fine as a Client Event Script, but when I run it as a Gateway Event Script, I can’t find the log messages even though I can functionally see that my script is running.

logger = system.util.getLogger(“mylogger”)  
logger.info(“running”)

In Diagnostics-Logs I can see my new logger in the filter but there are not any new messages.

What could I possibly doing wrong? Are there some silent permissions needed to write to the gateway log? Do I need to EndLine or flush something?

The latest entry in Diagnostics-Logs is 2 years old. Is it possible that these logs are turned off or being redirected?

thanks. i’m out of ideas.

joe

---

<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 28, 2020, 5:17pm UTC](https://forum.inductiveautomation.com/t/beginner-question-gateway-script-logger-not-working/39125/2 "2020-09-28T17:17:06Z")

</div>

Are you seeing any error logs where the script should be? What is the full script you are running? Make sure you are doing `import system.util`. I think it’s necessary for gateway scripts to import which is not always the case with certain client contexts iirc.

---

<div class="post-metadata">

**Author:** ![Kevin.Herron](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/kevin.herron/32/7259_2.png) [@Kevin.Herron](https://forum.inductiveautomation.com/u/Kevin.Herron)\
**Post date:** [September 28, 2020, 5:18pm UTC](https://forum.inductiveautomation.com/t/beginner-question-gateway-script-logger-not-working/39125/3 "2020-09-28T17:18:23Z")

</div>

> [@andonalerts](#):
>
> The latest entry in Diagnostics-Logs is 2 years old. Is it possible that these logs are turned off or being redirected?

This seems like a problem. What version of Ignition are you using? Are the wrapper.log files still updating?

---

<div class="post-metadata">

**Author:** ![andonalerts](https://avatars.discourse-cdn.com/v4/letter/a/df788c/32.png) [@andonalerts](https://forum.inductiveautomation.com/u/andonalerts)\
**Post date:** [September 28, 2020, 5:39pm UTC](https://forum.inductiveautomation.com/t/beginner-question-gateway-script-logger-not-working/39125/4 "2020-09-28T17:39:08Z")

</div>

This is Ignition 7.9.3

My includes are:  
import datetime, time, system, string

I don’t have access to the PC. Is there a URL to the wrapper logs?

thanks

joe

---

<div class="post-metadata">

**Author:** ![Kevin.Herron](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/kevin.herron/32/7259_2.png) [@Kevin.Herron](https://forum.inductiveautomation.com/u/Kevin.Herron)\
**Post date:** [September 28, 2020, 5:44pm UTC](https://forum.inductiveautomation.com/t/beginner-question-gateway-script-logger-not-working/39125/5 "2020-09-28T17:44:31Z")

</div>

> [@andonalerts](#):
>
> I don’t have access to the PC. Is there a URL to the wrapper logs?

No, you'll need access to the PC to get any further in troubleshooting or fixing this.

---

<div class="post-metadata">

**Author:** ![andonalerts](https://avatars.discourse-cdn.com/v4/letter/a/df788c/32.png) [@andonalerts](https://forum.inductiveautomation.com/u/andonalerts)\
**Post date:** [September 29, 2020, 3:23pm UTC](https://forum.inductiveautomation.com/t/beginner-question-gateway-script-logger-not-working/39125/6 "2020-09-29T15:23:56Z")

</div>

> [@andonalerts](#):
>
> wrapper logs

I've gotta talk someone who has access to that machine into looking at this for me... what do I ask for other than just modified dates on the files? Should they delete them? Is there another way they can reset them?

thanks

joe

---

<div class="post-metadata">

**Author:** ![Kevin.Herron](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/kevin.herron/32/7259_2.png) [@Kevin.Herron](https://forum.inductiveautomation.com/u/Kevin.Herron)\
**Post date:** [September 29, 2020, 3:26pm UTC](https://forum.inductiveautomation.com/t/beginner-question-gateway-script-logger-not-working/39125/7 "2020-09-29T15:26:23Z")

</div>

Wherever Ignition is installed there should be a `logs` directory with a `system_logs.idb` file in it. I’d ask them to stop the Ignition service, move this file somewhere else (or delete it if you don’t care about the old logs), then start Ignition again. It should create a new one and hopefully your diagnostic logs in the gateway will be current again.
