Search

User Manual

GETTING STARTED


MODULES AND PLATFORM


APPENDIX


TUTORIALS & HELPFUL TRICKS


GLOSSARY


STRATEGIC PARTNER LINKS

Sepasoft - MES Modules
Cirrus Link - MQTT Modules

RESOURCES

Inductive University
Ignition Demo Project
Knowledge Base Articles
Forum
IA Support
SDK Documentation
SDK Examples

ALL USER MANUAL VERSIONS

Ignition 8.1
Ignition 7.9
Ignition 7.8

Deprecated Pages

Skip to end of metadata
Go to start of metadata

The following feature is new in Ignition version 8.0.13
Click here to check out the other new features
This function is used in Python Scripting.

Description

Inserts a record into an audit profile.

Client Permission Restrictions

This scripting function has no Client Permission restrictions.

Syntax

system.util.audit( [action], [actionTarget], [actionValue], [auditProfile], [actor], [actorHost], [originatingSystem], [eventTimestamp], [originatingContext], [statusCode] )

  • Parameters

String action - What happened. [Optional] Default is null.

String actionTarget -  What the action happened to. [Optional] Default is null.

String actionValue -  The value of the action. Default is no value. [optional] 

String auditProfile Where the audit record should be stored. [Optional] Defaults to the project’s audit profile (if specified), or the gateway audit profile if calling in the gateway or perspective scope.

String actor - Who made the change. [Optional] Will be populated automatically if omitted, assuming there is a known user; 

String actorHost The hostname of whoever made the change. [Optional]  Will be populated automatically if omitted.

String, List originatingSystem An even-length list providing additional context to the audit event. Will be appended to the automatically generated list. Typically, the automatically generated context looks like this:  sys:${gatewayName}:\project:${projectName}). So if you provided [“component”, “Joe’sButton”, “field”, “value”], you would get a record with originatingSystem:sys:${gatewayName}:\project:${projectName}:\component:Joe’sButton:\field:valueOr, if a string is provided, this automatic context will not be used and your provided string will be written directly into the originatingSystem column in the audit profile.

Date eventTimestamp - When the event happened. [Optional]  Will be set to the current time if omitted.

Integer originatingContext - What scope the event originated from: 1 means Gateway, 2 means Designer, 4 means Client. [Optional] Will be set automatically if omitted.

Integer statusCode - A quality code to attach to the object. Defaults to 0, indicating no special meaning.

  • Scope

    Gateway, Vision Client, and Perspective Session.

Code Examples
# All of the parameters are optional, so you're free to only provide parameters you're interested in. 
# In the vary least you can always provide just the action you wish to record, allowing the function a chance to look up all of the other parameters automatically
system.util.audit("The user did a thing!")
# Simple example just showing parameter usage. 
myAction = "The button was pressed"
myTarget = "My Button"

system.util.audit(action = myAction , actionTarget = myTarget )
Keywords

system util audit, util.audit

  • No labels