# Write to wrapper.log from client startup script

**URL:** <https://forum.inductiveautomation.com/t/write-to-wrapper-log-from-client-startup-script/24169>\
**Category:** Ignition\
**Tags:** ignition79\
**Created:** [April 16, 2019, 8:25am UTC](https://forum.inductiveautomation.com/t/write-to-wrapper-log-from-client-startup-script/24169 "2019-04-16T08:25:48Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![zxcslo](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/zxcslo/32/61610_2.png) [@zxcslo](https://forum.inductiveautomation.com/u/zxcslo)\
**Post date:** [April 16, 2019, 8:25am UTC](https://forum.inductiveautomation.com/t/write-to-wrapper-log-from-client-startup-script/24169/1 "2019-04-16T08:25:48Z")

</div>

Is there any way to write some debug info into the wrapper.log from client Startup Script?  
I tried with

```auto
logger = system.util.getLogger('VK2Logger')
logger.warn("ClientStartUpScript: - There's already Ignition client running on %s. Closing second instance..." % (address))

```

but it’s not showing in wrapper.log.

I know about this: [http://forum.inductiveautomation.com/t/why-no-message-in-the-wrapper-log/10191/2](http://forum.inductiveautomation.com/t/why-no-message-in-the-wrapper-log/10191/2)  
I was just wondering if there is some way?

---

<div class="post-metadata">

**Author:** ![silverbacknet](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/silverbacknet/32/7385_2.png) [@silverbacknet](https://forum.inductiveautomation.com/u/silverbacknet)\
**Post date:** [April 16, 2019, 8:56am UTC](https://forum.inductiveautomation.com/t/write-to-wrapper-log-from-client-startup-script/24169/2 "2019-04-16T08:56:15Z")

</div>

It’s not the most elegant solution, but you can raise an exception without catching it, and it’ll be written to wrapper.log (along with the stack trace).

---

<div class="post-metadata">

**Author:** ![PRAMANJ](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pramanj/32/66935_2.png) [@PRAMANJ](https://forum.inductiveautomation.com/u/PRAMANJ)\
**Post date:** [April 16, 2019, 9:04am UTC](https://forum.inductiveautomation.com/t/write-to-wrapper-log-from-client-startup-script/24169/3 "2019-04-16T09:04:24Z")

</div>

just try print statement, for gateay scripts it automatically goes to wrapper.log. For client scripts I guess it will come in the console

---

<div class="post-metadata">

**Author:** ![chi](https://avatars.discourse-cdn.com/v4/letter/c/0ea827/32.png) [@chi](https://forum.inductiveautomation.com/u/chi)\
**Post date:** [April 16, 2019, 9:49am UTC](https://forum.inductiveautomation.com/t/write-to-wrapper-log-from-client-startup-script/24169/4 "2019-04-16T09:49:09Z")

</div>

Did you try `system.util.sendMessage`? In the message handler on the gateway you can write to the log.

---

<div class="post-metadata">

**Author:** ![zxcslo](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/zxcslo/32/61610_2.png) [@zxcslo](https://forum.inductiveautomation.com/u/zxcslo)\
**Post date:** [April 16, 2019, 11:09am UTC](https://forum.inductiveautomation.com/t/write-to-wrapper-log-from-client-startup-script/24169/5 "2019-04-16T11:09:38Z")

</div>

The beauty of this community… when you run out of ideas, there’s always someone with the new one… 👍
