yorel::yomm2::policy::basic_trace_output
defined in <yorel/yomm2/policy.hpp>, also provided by <yorel/yomm2/core.hpp>, <yorel/yomm2/keywords.hpp>
template<class Policy, typename Stream = /*unspecified*/>
struct basic_trace_output;
basic_trace_output
implements the trace_output
facet.
Policy: the policy containing the facet. Since basic_trace_output
has
static state, making the policy a template parameter ensures that each policy
has its own set of static member variables.
Stream: - Stream
can be any type that satisfies the requirements of
RestrictedOutputStream
. The default value is a lightweight version of
std::ostream
that writes to stderr
, using low-level C functions.
Name | Value |
---|---|
bool trace_enabled | enable or disable trace |
Stream trace_stream | the stream to print to |
Controls whether information is printed to trace_stream
. The flag is
initialized by examining the YOMM2_TRACE
environment variable. If it is set,
and its value is 1
, trace is enabled. Other values are reserved for possible
future use.
Initialized by the default constructor of Stream
. It is the responsibility of
the program to perform further initialization if needed - for example, open a
std::ofstream
, before calling update
.