次の方法で共有


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)

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