Audit
The Audit module tracks changes made to content items.
Setting up the audit module
The Audit Module requires creating of the Audits table in the database, to do this you can run /Lynicon/Admin/SQL/AddAudit.sql
Configuring the audit module
.UseModule<Auditing>(TimeSpan.FromDays(30)) .UseModule<Auditing>(TimeSpan.FromDays(30), (Func<Type, bool>)(t => !(new Type[] { typeof(User), typeof(SpecsDocContent) }.Contains(t)))
The audit module has two parameters:
- KeepFor is a TimeSpan indicating how long an audit record should be kept for. Â Every time the audit module starts up, it purges records older than this.
- ApplyToType is a function from Type to bool returning true if the content type should be audited.
Audit table in database
The Audits table in the database stores the change records:
Â
Field | Description |
Id | The table primary key |
Date | The date/time of a change |
UserId | The id of the user who made the change |
ItemId | The identity of the content item changed |
DataType | The full name of the content type of the item changed |
Version | The serialized ItemVersion of the content item changed |
Change | Any information about the actual change |
ChangeType | Indicates U - update D - delete A - add |