# Send email / react to message being written into ignition's logs

**URL:** <https://forum.inductiveautomation.com/t/send-email-react-to-message-being-written-into-ignitions-logs/105839>\
**Category:** Ignition\
**Tags:** scripting\
**Created:** [May 2, 2025, 6:56pm UTC](https://forum.inductiveautomation.com/t/send-email-react-to-message-being-written-into-ignitions-logs/105839 "2025-05-02T18:56:10Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Simon\_Hathout\_Willar](https://avatars.discourse-cdn.com/v4/letter/s/3da27b/32.png) [@Simon\_Hathout\_Willar](https://forum.inductiveautomation.com/u/Simon_Hathout_Willar)\
**Post date:** [May 2, 2025, 6:56pm UTC](https://forum.inductiveautomation.com/t/send-email-react-to-message-being-written-into-ignitions-logs/105839/1 "2025-05-02T18:56:10Z")

</div>

We have a client script running on a machine which isn't actively monitored, which just turns on and off some lights (so not safety critical). However, we'd like to know if there are any issues while the script is running -- such as the serial port closing, or a calculation somehow throwing an unrecoverable exception.

We catch errors and log them to the gateway (through a message handler), but this relies on someone going into the gateway logs every so often to look at them.

Is it an acceptable idea to have the message handler, in addition to writing to the logs, check if the indicated logging level is above a warning, and then act on that (such as sending an email)? Or is there a better way to handle this

---

<div class="post-metadata">

**Author:** ![Leor\_Fishman](https://avatars.discourse-cdn.com/v4/letter/l/e19adc/32.png) [@Leor\_Fishman](https://forum.inductiveautomation.com/u/Leor_Fishman)\
**Post date:** [May 2, 2025, 7:09pm UTC](https://forum.inductiveautomation.com/t/send-email-react-to-message-being-written-into-ignitions-logs/105839/2 "2025-05-02T19:09:46Z")

</div>

You could set a file watcher on the system logs idb and get additions every so often?

---

<div class="post-metadata">

**Author:** ![kcollins](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/kcollins/32/19646_2.png) [@kcollins](https://forum.inductiveautomation.com/u/kcollins)\
**Post date:** [May 2, 2025, 7:24pm UTC](https://forum.inductiveautomation.com/t/send-email-react-to-message-being-written-into-ignitions-logs/105839/3 "2025-05-02T19:24:45Z")

</div>

Ignition uses [Logback](https://logback.qos.ch/manual/), with its configuration stored in `data/logback.xml`. You can customize the configuration here--it sounds like one option might be adding an [SMTPAppender](https://logback.qos.ch/manual/appenders.html#SMTPAppender) configuration, though I've not ever configured this one myself, YMMV.

Other options (that might require a bit more backing infrastructure) would be to configure log-shipping of Ignition logs to an observability stack that has various facilities for alerting.

---

<div class="post-metadata">

**Author:** ![Leor\_Fishman](https://avatars.discourse-cdn.com/v4/letter/l/e19adc/32.png) [@Leor\_Fishman](https://forum.inductiveautomation.com/u/Leor_Fishman)\
**Post date:** [May 2, 2025, 7:51pm UTC](https://forum.inductiveautomation.com/t/send-email-react-to-message-being-written-into-ignitions-logs/105839/4 "2025-05-02T19:51:54Z")

</div>

That latter was what I meant by file watcher, yes
