Monday, April 20, 2009

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>");

No comments: