追蹤和偵錯設定結構描述Trace and Debug Settings Schema

追蹤和偵錯設定會指定用於收集、儲存及路由傳送訊息的追蹤接聽項,以及設定追蹤參數的層級。Trace and debug settings specify trace listeners that collect, store, and route messages, and the level where a trace switch is set.

下表描述每個追蹤和偵錯設定項目的函式。The following table describes the function of each trace and debug settings element.

項目Element 描述Description
<add><add> 將接聽項新增至追蹤來源的 Listeners 集合。Adds a listener to the Listeners collection for a trace source.
<add><add> 將接聽項新增至 Listeners 集合。Adds a listener to the Listeners collection.
<add><add> 將接聽項新增至 sharedListeners 集合。Adds a listener to the sharedListeners collection.
<add><add> 指定設定追蹤參數的層級。Specifies the level where a trace switch is set.
<assert><assert> 指定呼叫 Debug.Assert 方法時是否要顯示訊息方塊,此外也會指定寫入訊息之目的地檔案的名稱。Specifies whether to display a message box when you call the Debug.Assert method; also specifies the name of the file to write messages to.
<clear><clear> 清除追蹤來源的 Listeners 集合。Clears the Listeners collection for a trace source.
<clear><clear> 清除追蹤的 Listeners 集合。Clears the Listeners collection for trace.
<filter><filter> 將篩選新增至追蹤來源之 Listeners 集合中的接聽項。Adds a filter to a listener in the Listeners collection for a trace source.
<filter><filter> 將篩選新增至追蹤之 Listeners 集合中的接聽項。Adds a filter to a listener in the Listeners collection for trace.
<filter><filter> 將篩選新增至 sharedListeners 集合中的接聽項。Adds a filter to a listener in the sharedListeners collection.
<listeners><listeners> 為追蹤來源的 Listeners 集合指定接聽項。Specifies listeners for the Listeners collection for a trace source.
<listeners><listeners> 為追蹤的 Listeners 集合指定接聽項。Specifies listeners for the Listeners collection for trace.
<performanceCounters><performanceCounters> 指定效能計數器共用之全域記憶體的大小。Specifies the size of the global memory shared by performance counters.
<remove><remove> 從追蹤的 Listeners 集合移除接聽項。Removes a listener from the Listeners collection for trace.
<remove><remove> 從追蹤來源的 Listeners 集合移除接聽項。Removes a listener from the Listeners collection for a trace source.
<sharedListeners><sharedListeners> 包含任何來源或追蹤項目可參考的接聽項。Contains listeners that any source or trace element can reference.
<sources><sources> 包含起始追蹤訊息的追蹤來源。Contains trace sources that initiate tracing messages.
<source><source> 指定起始追蹤訊息的追蹤來源。Specifies a trace source that initiates tracing messages.
<switches><switches> 包含追蹤參數及設定追蹤參數的層級。Contains trace switches and the level where the trace switches are set.
<system.diagnostics><system.diagnostics> 指定用於收集、儲存及路由傳送訊息的追蹤接聽項,以及設定追蹤參數的層級。Specifies trace listeners that collect, store, and route messages and the level where a trace switch is set.
<trace><trace> 包含用於收集、儲存及路由傳送追蹤訊息的接聽項。Contains listeners that collect, store, and route tracing messages.

另請參閱See also