Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
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. |