16 namespace diagnostics {
81 template<
typename object_t>
85 for (
auto listener : listeners_)
96 template<
typename object_t>
100 for (
auto listener : listeners_)
112 for (
auto listener : listeners_)
124 for (
auto listener : listeners_)
134 template<
typename ...objects>
138 for (
auto listener : listeners_)
154 template<
typename ...objects_t>
163 template<
typename gu
id_t>
166 for (
auto listener : listeners_)
167 listener->trace_transfer(
trace_event_cache(), name_, id, message, related_activity_id);
172 std::map<xtd::ustring, xtd::ustring> attributes_;
Provides a multilevel switch to control tracing and debug output without recompiling your code.
Definition source_switch.h:22
bool should_trace(xtd::diagnostics::trace_event_type event_type)
Determines if trace listeners should be called, based on the trace event type.
Provides trace event data specific to a thread and a process.
Definition trace_event_cache.h:22
Represents a collection of xtd::diagnostics::trace_listener.
Definition trace_listener_collection.h:19
Provides a set of methods and properties that enable applications to trace the execution of code and ...
Definition trace_source.h:32
void trace_event(const xtd::diagnostics::trace_event_type &event_type, int32_t id, const xtd::ustring &message)
Writes a trace event message to the trace listeners in the listeners collection using the specified e...
Definition trace_source.h:121
void close()
Closes all the trace listeners in the trace listener collection.
xtd::diagnostics::trace_listener_collection & listeners()
Gets the collection of trace listeners for the trace source.
trace_source(const xtd::ustring &name, xtd::diagnostics::source_levels default_levels)
Initializes a new instance of the Trace_Source class, using the specified name for the source.
void trace_data(const xtd::diagnostics::trace_event_type &event_type, int32_t id, const std::vector< object_t > &data)
Writes trace data to the trace listeners in the Listeners collection using the specified event type,...
Definition trace_source.h:97
void listeners(const xtd::diagnostics::trace_listener_collection &listeners)
Sets the collection of trace listeners for the trace source.
trace_source(const xtd::ustring &name)
Initializes a new instance of the Trace_Source class, using the specified name for the source.
void trace_information(const xtd::ustring &format, const objects_t &... args)
Writes an informational message to the trace listeners in the listeners collection using the specifie...
Definition trace_source.h:155
void trace_event(const xtd::diagnostics::trace_event_type &event_type, int32_t id, const xtd::ustring &format, const objects &... args)
Writes a trace event message to the trace listeners in the listeners collection using the specified e...
Definition trace_source.h:135
void trace_transfer(int32_t id, const xtd::ustring &message, const guid_t &related_activity_id)
Writes a trace transfer message to the trace listeners in the listeners collection using the specifie...
Definition trace_source.h:164
void trace_event(const xtd::diagnostics::trace_event_type &event_type, int32_t id)
Writes a trace event message to the trace listeners in the listeners collection using the specified e...
Definition trace_source.h:109
void trace_information(const xtd::ustring &message)
Writes an informational message to the trace listeners in the listeners collection using the specifie...
void source_switch(const xtd::diagnostics::source_switch &source_switch)
Sets the source switch value.
void flush()
Flushes all the trace listeners in the trace listener collection.
const xtd::diagnostics::source_switch & source_switch() const
Gets the source switch value.
void trace_data(const xtd::diagnostics::trace_event_type &event_type, int32_t id, const object_t &data)
Writes trace data to the trace listeners in the Listeners collection using the specified event type,...
Definition trace_source.h:82
const xtd::ustring & name() const
Gets the name of the trace source.
Supports all classes in the xtd class hierarchy and provides low-level services to derived classes....
Definition object.h:26
Represents text as a sequence of UTF-8 code units.
Definition ustring.h:48
Contains xtd::diagnostics::default_trace_listener class.
trace_event_type
Identifies the type of event that has caused the trace.
Definition trace_event_type.h:18
source_levels
Specifies the levels of trace messages filtered by the source switch and event type filter....
Definition source_levels.h:18
@ information
Informational message.
@ off
Does not allow any events through.
The xtd namespace contains all fundamental classes to access Hardware, Os, System,...
Definition system_report.h:17
Contains xtd::diagnostics::source_levels enum class.
Contains xtd::diagnostics::source_switch class.
Contains xtd::diagnostics::trace_event_cache class.
Contains xtd::diagnostics::trace_listener_collection class.