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

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:

Vote here for storing previous value by default:

1 Like

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

I think we just route them to a [potentially] different audit profile based on Config → Security → General setting for Gateway Audit Profile:

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.

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

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:

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