Helper class to redirect the output of the logger in a certain scope. More...
#include <log.hpp>
Public Member Functions | |
tredirect_output_setter (std::ostream &stream) | |
Constructor. More... | |
~tredirect_output_setter () | |
Private Attributes | |
std::ostream * | old_stream_ |
The previously set redirection. More... | |
Helper class to redirect the output of the logger in a certain scope.
The main usage of the redirection is for the unit tests to validate the output on the logger with the expected output.
|
explicit |
Constructor.
stream | The stream to direct the output to. |
Definition at line 62 of file log.cpp.
References output_stream.
lg::tredirect_output_setter::~tredirect_output_setter | ( | ) |
Definition at line 68 of file log.cpp.
References old_stream_, and output_stream.
|
private |
The previously set redirection.
This value is stored here to be restored in this destructor.
Definition at line 91 of file log.hpp.
Referenced by ~tredirect_output_setter().