#include <event_type_filter.h>
Indicates whether a listener should trace based on the event type.
Constructors | |
event_type_filter (xtd::diagnostics::source_levels level) | |
Initializes a new instance of the event_type_filter class. More... | |
Properties | |
xtd::diagnostics::source_levels | event_type () const |
Gets the event type of the messages to trace. More... | |
void | event_type (xtd::diagnostics::source_levels level) |
Sets the event type of the messages to trace. More... | |
Methods | |
bool | should_trace (const xtd::diagnostics::trace_event_cache &cache, const xtd::ustring &source, xtd::diagnostics::trace_event_type event_type, int32_t id, const xtd::ustring &message, std::any data1, const std::vector< std::any > &data_array) override |
Determines whether the trace listener should trace the event. More... | |
Additional Inherited Members | |
![]() | |
![]() | |
trace_filter ()=default | |
Initializes a new instance of the trace_filter class. More... | |
bool | should_trace (const xtd::diagnostics::trace_event_cache &cache, const xtd::ustring &source, xtd::diagnostics::trace_event_type event_type, int32_t id, const xtd::ustring &message) |
determines whether the trace listener should trace the event. More... | |
bool | should_trace (const xtd::diagnostics::trace_event_cache &cache, const xtd::ustring &source, xtd::diagnostics::trace_event_type event_type, int32_t id, const xtd::ustring &message, std::any data1) |
determines whether the trace listener should trace the event. More... | |
|
explicit |
Initializes a new instance of the event_type_filter class.
level | A bitwise combination of the xtd::diagnostics::source_levels values that specifies the event type of the messages to trace. |
xtd::diagnostics::source_levels xtd::diagnostics::event_type_filter::event_type | ( | ) | const |
Gets the event type of the messages to trace.
void xtd::diagnostics::event_type_filter::event_type | ( | xtd::diagnostics::source_levels | level | ) |
Sets the event type of the messages to trace.
level | A bitwise combination of the xtd::diagnostics::source_levels values. |
|
overridevirtual |
Determines whether the trace listener should trace the event.
cache | The xtd::diagnostics::trace_event_cache that contains information for the trace event. |
source | The name of the source. |
event_type | One of the trace_event_type values specifying the type of event that has caused the trace |
id | A trace identifier number. |
message | Message to write. |
data1 | A trace data object. |
data_array | A trace data object. |
Implements xtd::diagnostics::trace_filter.