|
qxLib
|
Collects all log messages in the scope of its lifetime and outputs them when any assertion is triggered. Particularly useful in multithreaded context where many threads write simultaneously, allowing seeing a clear thread output. More...
#include <error_context.h>
Public Member Functions | |
| error_context (verbosity eMinCaptureVerbosity, string_view svHeader=QXT("Error context start"), string_view svFooter=QXT("Error context end")) noexcept | |
| error_context object constructor More... | |
Collects all log messages in the scope of its lifetime and outputs them when any assertion is triggered. Particularly useful in multithreaded context where many threads write simultaneously, allowing seeing a clear thread output.
Requires qx::error_context_stream to be added to the logger to work. Does not display anything if there were no log messages. Otherwise, it displays the header, all messages, and then the footer for visual differentiation. Doesn't catch constexpr verbosity erased messages.
Definition at line 32 of file error_context.h.
|
inlinenoexcept |
error_context object constructor
| eMinCaptureVerbosity | - minimum verbosity of messages this context should capture |
| svHeader | - a header to add when there is at least one message |
| svFooter | - a footer to add when there is at least one message |
Definition at line 13 of file error_context.inl.