共用方式為


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)
Available in Sandboxed Solutions: No

Syntax

'Declaration
Public Function GetEntries As SPAuditEntryCollection
'Usage
Dim instance As SPAudit
Dim returnValue As SPAuditEntryCollection

returnValue = instance.GetEntries()
public SPAuditEntryCollection GetEntries()

Return Value

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

Remarks

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).

See Also

Reference

SPAudit Class

SPAudit Members

GetEntries Overload

Microsoft.SharePoint Namespace

Other Resources

Item-Level Auditing with SharePoint Server 2007