Provides a set of methods and properties that enable applications to trace the execution of code and associate trace messages with their source.
Provides a set of methods and properties that enable applications to trace the execution of code and ...
Definition trace_source.h:41
Supports all classes in the xtd class hierarchy and provides low-level services to derived classes....
Definition object.h:42
#define core_export_
Define shared library export.
Definition core_export.h:13
- Inheritance
- xtd::object → xtd::diagnostics::trace_source
- Header
#include <xtd/diagnostics/trace_source>
- Namespace
- xtd::diagnostics
- Library
- xtd.core
- Note
- Adding a trace listener to the listeners collection can cause an exception to be thrown while tracing, if a resource used by the trace listener is not available. The conditions and the exception thrown depend on the trace listener and cannot be enumerated in this topic. It may be useful to place calls to the trace_source methods in try/catch blocks to detect and handle any exceptions from trace listeners.
|
void | close () |
| Closes all the trace listeners in the trace listener collection.
|
|
void | flush () |
| Flushes all the trace listeners in the trace listener collection.
|
|
template<typename object_t > |
void | trace_data (const xtd::diagnostics::trace_event_type &event_type, int32 id, const object_t &data) |
| Writes trace data to the trace listeners in the Listeners collection using the specified event type, event identifier, and trace data.
|
|
template<typename object_t > |
void | trace_data (const xtd::diagnostics::trace_event_type &event_type, int32 id, const std::vector< object_t > &data) |
| Writes trace data to the trace listeners in the Listeners collection using the specified event type, event identifier, and trace data.
|
|
void | trace_event (const xtd::diagnostics::trace_event_type &event_type, int32 id) |
| Writes a trace event message to the trace listeners in the listeners collection using the specified event type and event identifier.
|
|
void | trace_event (const xtd::diagnostics::trace_event_type &event_type, int32 id, const xtd::string &message) |
| Writes a trace event message to the trace listeners in the listeners collection using the specified event type, event identifier adn message.
|
|
template<typename ... objects> |
void | trace_event (const xtd::diagnostics::trace_event_type &event_type, int32 id, const xtd::string &format, const objects &... args) |
| Writes a trace event message to the trace listeners in the listeners collection using the specified event type, event identifier, and argument array and format.
|
|
void | trace_information (const xtd::string &message) |
| Writes an informational message to the trace listeners in the listeners collection using the specified message.
|
|
template<typename ... objects_t> |
void | trace_information (const xtd::string &format, const objects_t &... args) |
| Writes an informational message to the trace listeners in the listeners collection using the specified object array and formatting information.
|
|
template<typename guid_t > |
void | trace_transfer (int32 id, const xtd::string &message, const guid_t &related_activity_id) |
| Writes a trace transfer message to the trace listeners in the listeners collection using the specified numeric identifier, message, and related activity identifier.
|
|
|
| object ()=default |
| Create a new instance of the ultimate base class object.
|
|
virtual bool | equals (const object &obj) const noexcept |
| Determines whether the specified object is equal to the current object.
|
|
virtual size_t | get_hash_code () const noexcept |
| Serves as a hash function for a particular type.
|
|
virtual type_object | get_type () const noexcept |
| Gets the type of the current instance.
|
|
template<typename object_t > |
xtd::uptr< object_t > | memberwise_clone () const |
| Creates a shallow copy of the current object.
|
|
virtual xtd::string | to_string () const noexcept |
| Returns a xtd::string that represents the current object.
|
|
template<typename object_a_t , typename object_b_t > |
static bool | equals (const object_a_t &object_a, const object_b_t &object_b) noexcept |
| Determines whether the specified object instances are considered equal.
|
|
template<typename object_a_t , typename object_b_t > |
static bool | reference_equals (const object_a_t &object_a, const object_b_t &object_b) noexcept |
| Determines whether the specified object instances are the same instance.
|
|