Click or drag to resize

Tracing Filters

Home

A trace filter can be added to a trace listener to provide a layer of screening in addition to that provided to the trace source by switches. For example, EventTypeFilter can be added to a trace listener to control the event types that are output by the listener. Listeners that are called because the switch criteria are met can query their filter, if present, to determine if a trace is to be sent to the output.

One of several different types of filters can be assigned to a trace listener through the Filter property to provide a layer of screening in addition to that provided by the TraceSwitch. The filter can be used to control the event types produced by the listener.