EventSourceOptions.Level 属性

定义

获取或设置应用于事件的事件级别。Gets or sets the event level applied to the event.

public:
 property System::Diagnostics::Tracing::EventLevel Level { System::Diagnostics::Tracing::EventLevel get(); void set(System::Diagnostics::Tracing::EventLevel value); };
public System.Diagnostics.Tracing.EventLevel Level { get; set; }
member this.Level : System.Diagnostics.Tracing.EventLevel with get, set
Public Property Level As EventLevel

属性值

EventLevel

事件的事件级别。The event level for the event. 如果未设置,则默认为 Verbose (5)。If not set, the default is Verbose (5).

注解

ETW 事件还可按级别进行筛选。ETW events can also be filtered by level. 如果级别设置为 "详细" (5),则会引发所有级别的事件,包括详细和下面的事件。If the level is set at Verbose (5), events of all levels, including Verbose and below are raised. 如果级别设置为 "错误(2)",则只会引发属于错误级别和下面的事件。If the level is set at Error (2), only events that belong to Error level and below are raised.

适用于