system.util.audit
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β
Type | Parameter | Description |
---|---|---|
String | action | What happened. Default is null. [optional] |
String | actionTarget | What the action happened to. Default is null. [optional] |
String | actionValue | The value of the action. Default is no value. [optional] |
String | auditProfile | Where the audit record should be stored. Defaults to the projectβs audit profile (if specified), or the Gateway audit profile if calling in the Gateway or Perspective Session scope. [optional] |
String | actor | Who made the change. Will be populated automatically if omitted, assuming there is a known user. [optional] |
String | actorHost | The hostname of whoever made the change. Will be populated automatically if omitted. [optional] |
List[String], String | String] | originatingSystem |
Date | eventTimestamp | When the event happened. Will be set to the current time if omitted. [optional] |
Integer | originatingContext | What scope the event originated from: 1 means Gateway, 2 means Designer, 4 means Client. Will be set automatically if omitted. [optional] |
Integer | statusCode | A quality code to attach to the object. Defaults to 0, indicating no special meaning. [optional] |
Returnsβ
Nothing
Scopeβ
Gateway, Vision Client, and Perspective Session.
Code Examplesβ
Example #1
# All of the parameters are optional, so you're free to only provide parameters you're interested in.
# In the very least provide just the action you wish to record, which gives the function a chance to look up all of the other parameters automatically.
system.util.audit("The user did a thing!")
Example #2
# 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