Custom Audit in SharePoint using SPAudit

Here is a simple example on how to use custom auditing in sharepoint. I am using SPListItem to audit simple data.

oSPListItem.Audit.WriteAuditEvent(SPAuditEventType.Custom, "SomeDefinition", "<CustomAuditMessage>Hello World!</CustomAuditMessage>");

Comments