Change Object Auditing Mode
The Audit Trail System supports several object auditing modes.
Mode | Description |
---|---|
Full | All object changes are fully audited. This mode is the default. |
Lightweight | Only object creation, deletion and modification are audited. This mode does not audit names and values of changed properties. |
CreationOnly | Only object creation is audited. Intended for data import purposes. |
To change the current object auditing mode, set the AuditTrailService.Instance.ObjectAuditingMode property to one of the ObjectAuditingMode enumeration values. The following code demonstrates how this can be implemented.
XAF Windows Forms Application - Program.cs (Program.vb) file:
static void Main() {
MySolutionWindowsFormsApplication application = new MySolutionWindowsFormsApplication();
// ...
AuditTrailService.Instance.ObjectAuditingMode = ObjectAuditingMode.Lightweight;
application.Setup();
application.Start();
//...
}
XAF ASP.NET Application - Global.asax.cs (Global.asax.vb) file: