# \[FEATURE\] Add option to skip audit log in system.tag.write functions

**URL:** <https://forum.inductiveautomation.com/t/feature-add-option-to-skip-audit-log-in-system-tag-write-functions/61039>\
**Category:** Ignition\
**Created:** [June 22, 2022, 1:48am UTC](https://forum.inductiveautomation.com/t/feature-add-option-to-skip-audit-log-in-system-tag-write-functions/61039 "2022-06-22T01:48:40Z")\
**Posts on this page:** 16\
**Page:** 1

<div class="post-metadata">

**Author:** ![nminchin](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/nminchin/32/6911_2.png) [@nminchin](https://forum.inductiveautomation.com/u/nminchin)\
**Post date:** [June 22, 2022, 1:48am UTC](https://forum.inductiveautomation.com/t/feature-add-option-to-skip-audit-log-in-system-tag-write-functions/61039/1 "2022-06-22T01:48:40Z")

</div>

I need to add previous value into the audit log, so I essentially need to create my own wrapper functions for the two `system.tag.write*` functions and insert my own entries into the audit log table to which I’ve added a new ACTION\_VALUE\_PREVIOUS field. These functions both write into the audit log though which I would like to be able to skip, like is possible with the `system.db.*Update` functions.

PS. I already have a feature suggestion for actually recording the previous values by default, but I assume adding a simple skipAudit argument to the existing function would be far simpler

Vote here:

> **[Add option to skip audit log in system.tag.write functions | Voters |...](https://ideas.inductiveautomation.com/ignition-features-and-ideas/p/add-option-to-skip-audit-log-in-systemtagwrite-functions)**

Vote here for storing previous value by default:

> **[Add "PreviousValue" field to Audit Log table | Voters | Inductive Automation](https://ideas.inductiveautomation.com/ignition-features-and-ideas/p/add-previousvalue-field-to-audit-log-table)**

---

<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:** [June 22, 2022, 3:22pm UTC](https://forum.inductiveautomation.com/t/feature-add-option-to-skip-audit-log-in-system-tag-write-functions/61039/2 "2022-06-22T15:22:30Z")

</div>

If you do your writes from a gateway context I believe they skip the auditing system. So you could make your wrapper use `sendRequest`.

---

<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:** [June 22, 2022, 4:00pm UTC](https://forum.inductiveautomation.com/t/feature-add-option-to-skip-audit-log-in-system-tag-write-functions/61039/3 "2022-06-22T16:00:28Z")

</div>

> [@paul-griffith](#):
>
> If you do your writes from a gateway context I believe they skip the auditing system.

I think we just route them to a [potentially] different audit profile based on _Config -\> Security -\> General_ setting for _Gateway Audit Profile_:

 ![2022-06-22 at 10.59 AM](https://us1.discourse-cdn.com/inductiveautomation/original/3X/3/0/309bb1b8ac47f8f6a21f6a71b4096e33fb7ebe4c.png)

---

<div class="post-metadata">

**Author:** ![brandon1](https://avatars.discourse-cdn.com/v4/letter/b/ea666f/32.png) [@brandon1](https://forum.inductiveautomation.com/u/brandon1)\
**Post date:** [July 13, 2022, 1:37pm UTC](https://forum.inductiveautomation.com/t/feature-add-option-to-skip-audit-log-in-system-tag-write-functions/61039/4 "2022-07-13T13:37:27Z")

</div>

Am I incorrect in thinking that a gateway timer script defined in my project also executes in the gateway context? Since upgrading to 8.1.18 all my timer scripts that use system.tag.write are logging to the audit log for my project. This is a regression for our system.

---

<div class="post-metadata">

**Author:** ![lrose](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/lrose/32/62724_2.png) [@lrose](https://forum.inductiveautomation.com/u/lrose)\
**Post date:** [July 13, 2022, 2:25pm UTC](https://forum.inductiveautomation.com/t/feature-add-option-to-skip-audit-log-in-system-tag-write-functions/61039/5 "2022-07-13T14:25:48Z")

</div>

> [@brandon1](#):
>
> Am I incorrect in thinking that a gateway timer script defined in my project also executes in the gateway context?

That is correct, as well as anything that occurs in any other type of Gateway Event, a perspective script, or tag value change scripts.

---

<div class="post-metadata">

**Author:** ![nminchin](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/nminchin/32/6911_2.png) [@nminchin](https://forum.inductiveautomation.com/u/nminchin)\
**Post date:** [July 14, 2022, 4:59am UTC](https://forum.inductiveautomation.com/t/feature-add-option-to-skip-audit-log-in-system-tag-write-functions/61039/6 "2022-07-14T04:59:45Z")

</div>

Writing into the audit log was an inherent bug in previous versions where `system.tag.write*` functions would not write into the audit log. Also FYI, _every_ script that runs in Perspective runs in the gateway context, so user actions in Perspective that were written via script would also not be written to the audit log (very bad), where now they are. However, I did start an idea for exactly your use-case where you don’t want to write into the log:

> **[Add option to skip audit log in system.tag.write functions | Voters |...](https://ideas.inductiveautomation.com/ignition-features-and-ideas/p/add-option-to-skip-audit-log-in-systemtagwrite-functions)**

---

<div class="post-metadata">

**Author:** ![mazeyrat](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/mazeyrat/32/10955_2.png) [@mazeyrat](https://forum.inductiveautomation.com/u/mazeyrat)\
**Post date:** [July 14, 2022, 5:08am UTC](https://forum.inductiveautomation.com/t/feature-add-option-to-skip-audit-log-in-system-tag-write-functions/61039/7 "2022-07-14T05:08:07Z")

</div>

Another use case for this Idea:

If you write tag dataset with large value, for example when yau want to make cache data, you will reveive error and need to increase the action\_value db field to avoid it.

You dont want those cache data in audit logs.  
A skip option would be suitable

---

<div class="post-metadata">

**Author:** ![nminchin](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/nminchin/32/6911_2.png) [@nminchin](https://forum.inductiveautomation.com/u/nminchin)\
**Post date:** [March 22, 2024, 2:39pm UTC](https://forum.inductiveautomation.com/t/feature-add-option-to-skip-audit-log-in-system-tag-write-functions/61039/8 "2024-03-22T14:39:17Z")

</div>

I've again arrived at requiring this option to stop flooding an audit log with 100's of records every few seconds due to tag writes to 100's of tags in a gateway script which updates alarm summary tags. The audit table is 136GB at the moment, and the majority of this is all this crap 😕 With no way to skip auditing of these tag writes, I'm not sure what good option I have. I _could_ run a DELETE statement periodically to purge the table of the records after the fact, but that seems silly

---

<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:** [July 11, 2024, 10:51am UTC](https://forum.inductiveautomation.com/t/feature-add-option-to-skip-audit-log-in-system-tag-write-functions/61039/9 "2024-07-11T10:51:09Z")

</div>

This really renders the audit log useless...

It's been **TWO YEARS** since @nminchin post that issue and it is still going on.

It's really the time for IA to do something about it  
(make the audit log writes for tag.write\* OPTIONAL).

---

<div class="post-metadata">

**Author:** ![nminchin](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/nminchin/32/6911_2.png) [@nminchin](https://forum.inductiveautomation.com/u/nminchin)\
**Post date:** [July 11, 2024, 11:12am UTC](https://forum.inductiveautomation.com/t/feature-add-option-to-skip-audit-log-in-system-tag-write-functions/61039/10 "2024-07-11T11:12:11Z")

</div>

Out of interest, the table is 186GB now, after 4 months.  
I just checked the latest 1000 entries, and they're _ **all** _ writes to things like alarm summary count tags and GAN monitoring tags.  
The 1000 records span from:  
2024-07-11 20:35:19.163  
to:  
2024-07-11 20:36:59.923  
So 1min 40s. 10 Useless records a second... No wonder the table has 253,617,113 records!!

---

<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:** [July 11, 2024, 11:20am UTC](https://forum.inductiveautomation.com/t/feature-add-option-to-skip-audit-log-in-system-tag-write-functions/61039/11 "2024-07-11T11:20:23Z")

</div>

Mine has 590000 records in just 4 days and 99.9% are tag writes... 🤦‍♂️ 🤣

---

<div class="post-metadata">

**Author:** ![bao.nguyen](https://avatars.discourse-cdn.com/v4/letter/b/8c91f0/32.png) [@bao.nguyen](https://forum.inductiveautomation.com/u/bao.nguyen)\
**Post date:** [August 23, 2024, 8:34am UTC](https://forum.inductiveautomation.com/t/feature-add-option-to-skip-audit-log-in-system-tag-write-functions/61039/12 "2024-08-23T08:34:13Z")

</div>

Hi,

I observed the below from my testing (running Perspective on 8.1.42).

- Calling system.tag. **writeBlocking** () would insert new record(s) into audit logs' table.
- Calling system.tag. **write** () would _not_.

I hope that someone can confirm the same observation from his/her end.  
And that may be a workaround to 'skip audit log' for now.

Kind regards,

---

<div class="post-metadata">

**Author:** ![lrose](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/lrose/32/62724_2.png) [@lrose](https://forum.inductiveautomation.com/u/lrose)\
**Post date:** [August 23, 2024, 12:26pm UTC](https://forum.inductiveautomation.com/t/feature-add-option-to-skip-audit-log-in-system-tag-write-functions/61039/13 "2024-08-23T12:26:48Z")

</div>

> [@bao.nguyen](#):
>
> Calling system.tag. **write** () would _not_.

Because the function is depreciated and thus did not receive the update that writes to the audit log.

---

<div class="post-metadata">

**Author:** ![jlandwerlen](https://avatars.discourse-cdn.com/v4/letter/j/bc8723/32.png) [@jlandwerlen](https://forum.inductiveautomation.com/u/jlandwerlen)\
**Post date:** [August 23, 2024, 1:07pm UTC](https://forum.inductiveautomation.com/t/feature-add-option-to-skip-audit-log-in-system-tag-write-functions/61039/14 "2024-08-23T13:07:01Z")

</div>

Read this topic,

> [@\[IGN-6344\] Audit log full from system.tag.writeBlocking calls](https://forum.inductiveautomation.com/t/ign-6344-audit-log-full-from-system-tag-writeblocking-calls/61142):
>
> I upgraded Ignition from 8.1.17 to 8.1.18 on Monday (6/20). Version 8.1.17 did not log the system.tag.writeBlocking script calls in the audit log. Version 8.1.18 is logging all of them! For example: I have a gateway timer script running to update a couple tags using the system.tag.writeBlocking function. I write the number of active and unacknowledged alarms to these tags so I can display an icon if there are alarms that need attention. Now when I get an alarm, the tag write function const…

---

<div class="post-metadata">

**Author:** ![m.cornet](https://avatars.discourse-cdn.com/v4/letter/m/b5e925/32.png) [@m.cornet](https://forum.inductiveautomation.com/u/m.cornet)\
**Post date:** [September 24, 2024, 2:38pm UTC](https://forum.inductiveautomation.com/t/feature-add-option-to-skip-audit-log-in-system-tag-write-functions/61039/15 "2024-09-24T14:38:33Z")

</div>

> [@paul-griffith](#):
>
> If you do your writes from a gateway context I believe they skip the auditing system.

Hi,  
I came to this thread because I think somewhere between version 8.1.24 and 8.1.42 a bug has been introduced about this issue.  
Our project makes several tag writes through a gateway scripts (about 300 per second). Nowadays, after upgrading from 8.1.24 to 8.1.42, all fo those tag writes are being written to the auditing database.

Do you have any information about this behavior?  
Thanks

---

<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:** [September 24, 2024, 3:04pm UTC](https://forum.inductiveautomation.com/t/feature-add-option-to-skip-audit-log-in-system-tag-write-functions/61039/16 "2024-09-24T15:04:12Z")

</div>

If you follow and **read** the linked topic in the comment above yours, you will see that it is fixed in v8.1.43.
