# UDT - Tag Event Scripts - error log

**URL:** <https://forum.inductiveautomation.com/t/udt-tag-event-scripts-error-log/57647>\
**Category:** Ignition\
**Created:** [March 25, 2022, 2:41pm UTC](https://forum.inductiveautomation.com/t/udt-tag-event-scripts-error-log/57647 "2022-03-25T14:41:54Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Manuel\_Lefebvre](https://avatars.discourse-cdn.com/v4/letter/m/8c91f0/32.png) [@Manuel\_Lefebvre](https://forum.inductiveautomation.com/u/Manuel_Lefebvre)\
**Post date:** [March 25, 2022, 2:41pm UTC](https://forum.inductiveautomation.com/t/udt-tag-event-scripts-error-log/57647/1 "2022-03-25T14:41:54Z")

</div>

If there is an error from a SQL stored procedure called in my tag event script (tag value changed),I only see the error in the diagnostic log or in the wrapper file when I applied a change on the script.

When I change the value of my tag, the script is called but the error doesn’t appeared in any log.

Is it a normal behavior ?

---

<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:** [March 30, 2022, 6:12pm UTC](https://forum.inductiveautomation.com/t/udt-tag-event-scripts-error-log/57647/2 "2022-03-30T18:12:31Z")

</div>

@Manuel_Lefebvre, thank you for reaching out on this… It looks like there is a small issue here, where once a given tag event script has gone _into_ error, it stops logging. The intent is to log once upon a script going into error, and not bombard the logger with each execution (you can set `tags.eventscripts.dispatcher` to `DEBUG` level to have it log each time as a workaround, though you may also get some other unrelated “chatter” as a result).

Unfortunately, looking into this, it doesn’t look like there is a good reset of this _in-error_ condition once it is set (other than committing/re-saving the script). We’re going to file a ticket on this on our side.

---

<div class="post-metadata">

**Author:** ![robmann](https://avatars.discourse-cdn.com/v4/letter/r/9de0a6/32.png) [@robmann](https://forum.inductiveautomation.com/u/robmann)\
**Post date:** [April 12, 2024, 12:23pm UTC](https://forum.inductiveautomation.com/t/udt-tag-event-scripts-error-log/57647/3 "2024-04-12T12:23:05Z")

</div>

I have the same issue with debugging a tag event script that is executing a Sepasoft MES operation. the code in the event has full try except raise final. I found the chatter from setting the dispatcher to DEBUG excessive so I am making fake edits to the code to get the error from the Sepasoft call to commit to the logs when raised

---

<div class="post-metadata">

**Author:** ![robmann](https://avatars.discourse-cdn.com/v4/letter/r/9de0a6/32.png) [@robmann](https://forum.inductiveautomation.com/u/robmann)\
**Post date:** [April 15, 2024, 2:23pm UTC](https://forum.inductiveautomation.com/t/udt-tag-event-scripts-error-log/57647/4 "2024-04-15T14:23:38Z")

</div>

another alternative is to send str(sys.exc\_info()) to the log. that will at least give you an abbreviated Python version of the error

---

<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:** [April 15, 2024, 2:45pm UTC](https://forum.inductiveautomation.com/t/udt-tag-event-scripts-error-log/57647/5 "2024-04-15T14:45:33Z")

</div>

Or you can use `PythonAsJavaException()` from [later.py](https://www.automation-pros.com/ignition/later.py) to send a full python backtrace to the log.
