#include <Trace.h>
Public Member Functions | |
| TraceContextBumper () noexcept | |
|
template<typename CHAR_T , Private_::IFormatLiteral_ FORMAT_LITERAL, typename... ARGS> requires (same_as<CHAR_T, char> or same_as<CHAR_T, wchar_t>) | |
| TraceContextBumper (const CHAR_T *contextName, const FORMAT_LITERAL &fmt, ARGS &&... args) noexcept | |
| fmt "..."_f: args checked at compile time | |
Define a new start/end context (with optional label) for trace messages emitted with DbgTrace (), and indent future DbgTrace () messages (from this thread) during the lifetime of TraceContextBumper.
Generates log output: <MyXercesMemMgr_::DUMPCurMemStats> x </MyXercesMemMgr_::DUMPCurMemStats>
Generates log output (assuming ReadRaw is quick and doesn't do more DbgTrace calls): <OptionsFile::ReadRaw (readfilename=C:\Users\Lewis\AppData\Local\Temp\MyModule.json)/>
Generates log output: <OptionsFile::ReadRaw (readfilename=C:\Users\Lewis\AppData\Local\Temp\MyModule.json)> x </OptionsFile::ReadRaw>
|
noexcept |
If constructor taking const char* used, the argument must be ASCII characters.
The constructor with 'extraFmt', emits the extra data in the heading of the trace message, but not the close brace. This can allow for more terse TraceContextBumper messages, and more terse calling usage.
For TraceContextBumper (const wchar_t* contextName, const wchar_t* extraFmt, ...) usage,