Just wanted to share a solution to how to audit/log user actions via perspective. An Ignition rep helped us out with this and I imagine some people may have a similar need/issue.
First thing was that registering perspective user login/logout does NOT work with the default audit database. You need to create your own audit table to do this, so we made a table named PERSPECTIVE_AUDIT_TABLE.
To register login/logout user events, in Designer go to Project->Session Events->Startup (or Shutdown). then you can insert code like we did:
userName = session.props.auth.user.userName action = "Login" system.db.runPrepUpdate("INSERT INTO PERSPECTIVE_AUDIT_TABLE(ACTOR,ACTION) VALUES (?,?)", [userName, action])
Logging user control changes such as button presses, etc. are done via component event scripting. For example for a slider action we used:
userName = self.session.props.auth.user.userName action = self.view.params.Farm + " " + self.view.params.ControllerName+" forced on for " + str(self.getSibling("NumericEntryField").props.value) + " Minutes" system.db.runPrepUpdate("INSERT INTO PERSPECTIVE_AUDIT_TABLE(ACTOR,ACTION) VALUES (?,?)", [userName,action])
Anyways we really appreciate the help from the Ignition team and hope this can help other people. Thanks.