SPAudit.GetEntries method

Gets a collection of SPAuditEntry objects from the audit data stored in the SharePoint database, without restriction as to date, user, or event type.

Namespace:  Microsoft.SharePoint
Assembly:  Microsoft.SharePoint (in Microsoft.SharePoint.dll)

public SPAuditEntryCollection GetEntries()

Return value

Type: Microsoft.SharePoint.SPAuditEntryCollection
An SPAuditEntryCollection that holds the requested SPAuditEntry items.

Only audit entries that are relevant to the parent object that has this SPAudit object as the value of its Audit property are returned, with one exception. If the parent is an SPWeb object, all audit data in the database for the current site collection is returned, just as it is if the parent is an SPSite object.

There are no other restrictions on what is returned; that is, no restriction as to date of the event, user, or type of event.

For a more customized query, use GetEntries(SPAuditQuery).