78 [[nodiscard]] auto
name() const noexcept -> const
xtd::
string&;
109 template<class object_t>
112 if (source_switch_.should_trace(event_type))
113 for (
auto listener : listeners_)
124 template<
class object_t>
127 if (source_switch_.should_trace(event_type))
128 for (
auto listener : listeners_)
139 if (source_switch_.should_trace(event_type))
140 for (
auto listener : listeners_)
151 if (source_switch_.should_trace(event_type))
152 for (
auto listener : listeners_)
162 template<
class ...objects>
165 if (source_switch_.should_trace(event_type))
166 for (
auto listener : listeners_)
182 template<
class ...objects_t>
191 template<
class gu
id_t>
194 for (
auto listener : listeners_)
195 listener->trace_transfer(
trace_event_cache(), name_,
id, message, related_activity_id);
Contains xtd::array class.
Provides methods for creating, manipulating, searching, and sorting arrays, thereby serving as the ba...
Definition array.hpp:64
Provides a multilevel switch to control tracing and debug output without recompiling your code.
Definition source_switch.hpp:31
Provides trace event data specific to a thread and a process.
Definition trace_event_cache.hpp:29
Represents a collection of xtd::diagnostics::trace_listener.
Definition trace_listener_collection.hpp:29
auto trace_event(const xtd::diagnostics::trace_event_type &event_type, xtd::int32 id, const xtd::string &message) -> void
Writes a trace event message to the trace listeners in the listeners collection using the specified e...
Definition trace_source.hpp:149
auto listeners() noexcept -> xtd::diagnostics::trace_listener_collection &
Gets the collection of trace listeners for the trace source.
auto trace_information(const xtd::string &format, const objects_t &... args) -> void
Writes an informational message to the trace listeners in the listeners collection using the specifie...
Definition trace_source.hpp:183
trace_source(const xtd::string &name, xtd::diagnostics::source_levels default_levels)
Initializes a new instance of the Trace_Source class, using the specified name for the source.
trace_source(const xtd::string &name)
Initializes a new instance of the Trace_Source class, using the specified name for the source.
auto flush() -> void
Flushes all the trace listeners in the trace listener collection.
auto name() const noexcept -> const xtd::string &
Gets the name of the trace source.
auto close() -> void
Closes all the trace listeners in the trace listener collection.
auto trace_data(const xtd::diagnostics::trace_event_type &event_type, xtd::int32 id, const xtd::array< object_t > &data) -> void
Writes trace data to the trace listeners in the Listeners collection using the specified event type,...
Definition trace_source.hpp:125
auto trace_event(const xtd::diagnostics::trace_event_type &event_type, xtd::int32 id) -> void
Writes a trace event message to the trace listeners in the listeners collection using the specified e...
Definition trace_source.hpp:137
auto source_switch() const noexcept -> const xtd::diagnostics::source_switch &
Gets the source switch value.
auto trace_transfer(xtd::int32 id, const xtd::string &message, const guid_t &related_activity_id) -> void
Writes a trace transfer message to the trace listeners in the listeners collection using the specifie...
Definition trace_source.hpp:192
auto trace_data(const xtd::diagnostics::trace_event_type &event_type, xtd::int32 id, const object_t &data) -> void
Writes trace data to the trace listeners in the Listeners collection using the specified event type,...
Definition trace_source.hpp:110
auto trace_information(const xtd::string &message) -> void
Writes an informational message to the trace listeners in the listeners collection using the specifie...
auto trace_event(const xtd::diagnostics::trace_event_type &event_type, xtd::int32 id, const xtd::string &format, const objects &... args) -> void
Writes a trace event message to the trace listeners in the listeners collection using the specified e...
Definition trace_source.hpp:163
Supports all classes in the xtd class hierarchy and provides low-level services to derived classes....
Definition object.hpp:45
Contains xtd::diagnostics::default_trace_listener class.
std::map< key_t, value_t, lesser_t, allocator_t > sorted_dictionary
Represents a collection of key/value pairs that are sorted on the key.
Definition sorted_dictionary.hpp:38
#define core_export_
Define shared library export.
Definition core_export.hpp:13
xtd::basic_string< char > string
Represents text as a sequence of UTF-8 code units.
Definition __string_definitions.hpp:43
std::int32_t int32
Represents a 32-bit signed integer.
Definition int32.hpp:23
sptr< type_t > new_sptr(args_t &&... args)
xtd::new_sptr operator creates a xtd::sptr object.
Definition new_sptr.hpp:24
trace_event_type
Identifies the type of event that has caused the trace.
Definition trace_event_type.hpp:25
source_levels
Specifies the levels of trace messages filtered by the source switch and event type filter....
Definition source_levels.hpp:25
@ information
Informational message.
Definition trace_event_type.hpp:33
@ off
Does not allow any events through.
Definition source_levels.hpp:27
The xtd::diagnostics namespace provides classes that allow you to interact with system processes,...
Definition assert_dialog_result.hpp:10
The xtd namespace contains all fundamental classes to access Hardware, Os, System,...
Definition abstract_object.hpp:8
constexpr const_pointer data() const noexcept
Gets direct access to the underlying contiguous storage.
Definition read_only_span.hpp:201
Contains xtd::object class.
Contains xtd::collections::generic::sorted_dictionary <key_t, value_t> class.
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.