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)

public void SetAll(
	TraceSeverity traceSeverity,
	EventSeverity eventSeverity
)

Parameters

traceSeverity
Type: Microsoft.SharePoint.Administration.TraceSeverity

A TraceSeverity value that represents the least important event to report to the trace log.

eventSeverity
Type: Microsoft.SharePoint.Administration.EventSeverity

An EventSeverity value that represents the least important event to report to the Windows event log.

ExceptionCondition
ArgumentOutOfRangeException

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

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.

NoteNote

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.

Show: