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)
Available in Sandboxed Solutions: No
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
traceSeverity
Type: Microsoft.SharePoint.Administration.TraceSeverityA TraceSeverity value that represents the least important event to report to the trace log.
eventSeverity
Type: Microsoft.SharePoint.Administration.EventSeverityAn EventSeverity value that represents the least important event to report to the Windows event log.
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