Condividi tramite


SPWebApplication.EventLogRetentionPeriod Property

Gets or sets the amount of time to preserve event logs.

Namespace:  Microsoft.SharePoint.Administration
Assembly:  Microsoft.SharePoint (in Microsoft.SharePoint.dll)
Available in Sandboxed Solutions: No

Syntax

'Declaration
Public Property EventLogRetentionPeriod As TimeSpan
    Get
    Set
'Usage
Dim instance As SPWebApplication
Dim value As TimeSpan

value = instance.EventLogRetentionPeriod

instance.EventLogRetentionPeriod = value
public TimeSpan EventLogRetentionPeriod { get; set; }

Property Value

Type: System.TimeSpan
TimeSpan
The amount of time to preserve event logs, ignoring hours, minutes, and seconds.

Exceptions

Exception Condition
SecurityException

The current user is not a farm administrator.

See Also

Reference

SPWebApplication Class

SPWebApplication Members

Microsoft.SharePoint.Administration Namespace