次の方法で共有


SPDiagnosticsServiceBase.SetAll method (TraceSeverity, EventSeverity)

Sets the threshold at which traces and Windows events associated with all categories are written to trace logs and the Windows event log.

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

Syntax

'Declaration
Public Sub SetAll ( _
    traceSeverity As TraceSeverity, _
    eventSeverity As EventSeverity _
)
'Usage
Dim instance As SPDiagnosticsServiceBase
Dim traceSeverity As TraceSeverity
Dim eventSeverity As EventSeverity

instance.SetAll(traceSeverity, eventSeverity)
public void SetAll(
    TraceSeverity traceSeverity,
    EventSeverity eventSeverity
)

Parameters

Exceptions

Exception Condition
ArgumentOutOfRangeException

Thrown when traceSeverity or eventSeverity are unmapped or out of range.

Remarks

Use this method to control the severity of all events captured in trace logs and in the Windows event log. At less severe logging levels, the number of events logged will increase.

Note

This method provides a programmatic means of accomplishing what you can do manually in the Event Throttling section on the Central Administration Diagnostics Logging page. In the user interface, you would select All Categories and then select severity levels.

See also

Reference

SPDiagnosticsServiceBase class

SPDiagnosticsServiceBase members

SetAll overload

Microsoft.SharePoint.Administration namespace

ResetAll()