# How to log error on Ignition Gateway Console?

**URL:** <https://forum.inductiveautomation.com/t/how-to-log-error-on-ignition-gateway-console/32499>\
**Category:** General Discussion\
**Created:** [February 21, 2020, 3:34pm UTC](https://forum.inductiveautomation.com/t/how-to-log-error-on-ignition-gateway-console/32499 "2020-02-21T15:34:47Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![fcipoletti](https://avatars.discourse-cdn.com/v4/letter/f/ac91a4/32.png) [@fcipoletti](https://forum.inductiveautomation.com/u/fcipoletti)\
**Post date:** [February 21, 2020, 3:34pm UTC](https://forum.inductiveautomation.com/t/how-to-log-error-on-ignition-gateway-console/32499/1 "2020-02-21T15:34:47Z")

</div>

Hi. Im trying to log error on Ignition Gateway Console, and I cant.  
I use:

```auto
try:
   # ...some code...
   pass
except:
     logger =system.util.getLogger('myLogger')
     logger.error('Testing error on logs')
     # ... some code...

```

I can see the error on Client Diagnostic Logs, but not on Gateway Console Logs. What is the mistake?

Ign version: 7.8.4 (b2016082217)

Thanks.

---

<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:** [February 21, 2020, 3:48pm UTC](https://forum.inductiveautomation.com/t/how-to-log-error-on-ignition-gateway-console/32499/2 "2020-02-21T15:48:55Z")

</div>

No mistake, log messages logged in the client or designer don’t get sent to the gateway.

---

<div class="post-metadata">

**Author:** ![witman](https://avatars.discourse-cdn.com/v4/letter/w/d2c977/32.png) [@witman](https://forum.inductiveautomation.com/u/witman)\
**Post date:** [February 21, 2020, 7:27pm UTC](https://forum.inductiveautomation.com/t/how-to-log-error-on-ignition-gateway-console/32499/3 "2020-02-21T19:27:40Z")

</div>

If it's available in your version, you can accomplish this by sending a message from the client to the gateway using [system.util.sendMessage](https://docs.inductiveautomation.com/display/DOC80/system.util.sendMessage) and then logging it there. See screenshot of gateway message handler in linked post below:

> [@Run a gateway script on a remote Gateway](http://forum.inductiveautomation.com/t/run-a-gateway-script-on-a-remote-gateway/32179/4):
>
> You add the handler under the message section of gateway event scripts on the receiving gateway: The messageHandler parameter matches the gateway message handler name (“logger” in the example shown).

The client sends a message with with `loggerName`, `level`, and `message` and the gateway logs it accordingly.
