# Gateway event triggered by specific log outputs?

**URL:** <https://forum.inductiveautomation.com/t/gateway-event-triggered-by-specific-log-outputs/103975>\
**Category:** Ignition\
**Tags:** ignition81\
**Created:** [March 20, 2025, 6:48pm UTC](https://forum.inductiveautomation.com/t/gateway-event-triggered-by-specific-log-outputs/103975 "2025-03-20T18:48:54Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![justin.brzozoski](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/justin.brzozoski/32/13452_2.png) [@justin.brzozoski](https://forum.inductiveautomation.com/u/justin.brzozoski)\
**Post date:** [March 20, 2025, 6:48pm UTC](https://forum.inductiveautomation.com/t/gateway-event-triggered-by-specific-log-outputs/103975/1 "2025-03-20T18:48:55Z")

</div>

Twice now in 5+ years I've bumped into circumstances where something is failing in some Java code that I have no visibility into, for some event that I have minimal controls over, but I want to be able to have a script run in response to.

In both cases, I can see the event in the Ignition logs, but have no control of the event that triggered it. What I think I need is a gateway event that can be triggered by a log event. The gateway event should be setup to look for messages from a specific logger name and optionally match the log message against a regex or search string. When the event triggers, a script should be run with the log event as a parameter.

I opened a suggestion on the feedback board. If you think this might be useful to you as well, please give it a vote. 👍

> **[Gateway event triggered by logging events | Ignition Features and Ideas |...](https://ideas.inductiveautomation.com/ignition-features-and-ideas/p/gateway-event-triggered-by-logging-events)**
>
> Twice now in 5+ years I've bumped into circumstances where something is failing in some Java code that I have no visibility into, for some event that I have

If it matters, the two cases I bumped into were:

- Twilio failures when a recipient's phone number is no longer valid or they have replied "STOP" to Twilio and we need to know that they are no longer receiving alarms
- Sparkplug/MQTT Engine failures when someone out in the field has adjusted their tags on the edge to have the same name except for a case-only name change, at which point MQTT Engine just chokes on that tag and it stops working altogether

---

<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:** [March 20, 2025, 6:54pm UTC](https://forum.inductiveautomation.com/t/gateway-event-triggered-by-specific-log-outputs/103975/2 "2025-03-20T18:54:17Z")

</div>

You'll probably have to use the SDK to implement a log consumer that generate events. Probably very difficult until v8.3 lets you make a custom event stream.

---

<div class="post-metadata">

**Author:** ![justin.brzozoski](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/justin.brzozoski/32/13452_2.png) [@justin.brzozoski](https://forum.inductiveautomation.com/u/justin.brzozoski)\
**Post date:** [March 20, 2025, 7:02pm UTC](https://forum.inductiveautomation.com/t/gateway-event-triggered-by-specific-log-outputs/103975/3 "2025-03-20T19:02:50Z")

</div>

I was kinda hoping there would be enough other people who could use something similar to convince IA to do it. 🙂

---

<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:** [March 20, 2025, 7:04pm UTC](https://forum.inductiveautomation.com/t/gateway-event-triggered-by-specific-log-outputs/103975/4 "2025-03-20T19:04:07Z")

</div>

Kinda tricky to avoid errors in your event script feeding back into your log event generator. Kaboom!

---

<div class="post-metadata">

**Author:** ![justin.brzozoski](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/justin.brzozoski/32/13452_2.png) [@justin.brzozoski](https://forum.inductiveautomation.com/u/justin.brzozoski)\
**Post date:** [March 20, 2025, 7:08pm UTC](https://forum.inductiveautomation.com/t/gateway-event-triggered-by-specific-log-outputs/103975/5 "2025-03-20T19:08:41Z")

</div>

Yeah, I totally get that. Very easy to accidentally make infinite recursion with this feature. But that doesn't mean it shouldn't exist.

It should probably have some sort of cool-down or lockout if over-triggered, though.

---

<div class="post-metadata">

**Author:** ![paul-griffith](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/paul-griffith/32/37249_2.png) [@paul-griffith](https://forum.inductiveautomation.com/u/paul-griffith)\
**Post date:** [March 21, 2025, 3:23pm UTC](https://forum.inductiveautomation.com/t/gateway-event-triggered-by-specific-log-outputs/103975/6 "2025-03-21T15:23:08Z")

</div>

Hmm. I see the utility, but this does seem like the wrong solution to the problem...

But, to Phil's point, I could definitely see us adding an opt-in event stream log capture facility. I wouldn't expect any higher level abstraction like a new gateway event script type, though - event streams are the new standard throughout the platform for this pattern.

---

<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:** [March 21, 2025, 3:24pm UTC](https://forum.inductiveautomation.com/t/gateway-event-triggered-by-specific-log-outputs/103975/7 "2025-03-21T15:24:31Z")

</div>

> [@paul-griffith](#):
>
> event streams are the new standard throughout the platform for this pattern.

Too bad we pulled the implementation out of platform and turned it into an add-on module 😢 😢 😢

---

<div class="post-metadata">

**Author:** ![paul-griffith](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/paul-griffith/32/37249_2.png) [@paul-griffith](https://forum.inductiveautomation.com/u/paul-griffith)\
**Post date:** [March 21, 2025, 3:25pm UTC](https://forum.inductiveautomation.com/t/gateway-event-triggered-by-specific-log-outputs/103975/8 "2025-03-21T15:25:05Z")

</div>

Oh, right 🙃
