共用方式為


SPDiagnosticsServiceBase.SetAll method (TraceSeverity, EventSeverity)

將所有類別相關都聯的事件寫入至追蹤記錄檔和 Windows 事件記錄檔的追蹤及 Windows 臨界值。

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

Syntax

'宣告
Public Sub SetAll ( _
    traceSeverity As TraceSeverity, _
    eventSeverity As EventSeverity _
)
'用途
Dim instance As SPDiagnosticsServiceBase
Dim traceSeverity As TraceSeverity
Dim eventSeverity As EventSeverity

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

參數

Exceptions

Exception Condition
ArgumentOutOfRangeException

擲回traceSeverity或eventSeverity時未對應或範圍之外。

備註

使用此方法來控制擷取在追蹤記錄檔和 Windows 事件記錄檔中的所有事件的嚴重性。較不嚴重的記錄層級會增加記錄的事件數。

注意事項注意事項

此方法提供以程式設計方式完成可以怎麼做以手動方式在管理中心內的診斷記錄] 頁面上的 [事件節流] 區段中的方法。在使用者介面中,您會選取所有類別,然後都選取 [嚴重性層級。

請參閱

參照

SPDiagnosticsServiceBase class

SPDiagnosticsServiceBase members

SetAll overload

Microsoft.SharePoint.Administration namespace

ResetAll()