語言

EventSourceSettings 列舉

定義

指定事件來源的組態選項。

此列舉支援其成員值的位元組合。

public enum class EventSourceSettings
[System.Flags]
public enum EventSourceSettings
[<System.Flags>]
type EventSourceSettings = 
Public Enum EventSourceSettings
繼承
EventSourceSettings
屬性

欄位

名稱 值 Description
Default 0

任何特殊設定選項都沒有啟用。

ThrowOnEventWriteErrors 1

事件來源在發生錯誤時拋出例外。

EtwManifestEventFormat 4

ETW聽眾在提出事件時應採用以清單為基礎的格式。 這是定義由 EventSource 受保護 EventSource 建構子衍生出的型別時的預設選項。 此 EtwSelfDescribingEventFormat格式的每次事件序列化開銷較低於 。 欲了解更多資訊,請參閱 自我描述事件格式與顯現事件格式。

EtwSelfDescribingEventFormat 8

ETW 聽眾應使用自我描述事件格式。 這是使用公開EventSource建構子建立新實例EventSource時的預設選項。 此格式功能較多,且與不使用 TraceEvent 函式庫的監聽者相容性較高,但相較 EtwManifestEventFormat於 。 欲了解更多資訊,請參閱 自我描述事件格式與顯現事件格式。

備註

僅應指定 EtwManifestEventFormat 或 EtwSelfDescribingEventFormat,兩者皆不應指定。

適用於