xtd 0.2.0
Loading...
Searching...
No Matches

◆ write_if() [3/3]

template<typename object_t >
static void xtd::diagnostics::trace::write_if ( bool  condition,
const object_t &  message,
const xtd::string category 
)
inlinestatic

Writes a category name and message to the trace listeners in the Listeners collection if a condition is true.

Parameters
conditiontrue to cause a message to be written; otherwise, false.
messageA message to write.
categoryA category name used to organize the output.
Remarks
By default, the output is written to an instance of default_trace_listener.
This method calls the write method of the trace listener.