Helper class to redirect the output of the logger in a certain scope. More...
#include <log.hpp>
Public Member Functions | |
redirect_output_setter (std::ostream &stream) | |
Constructor. More... | |
~redirect_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 290 of file log.cpp.
References output_stream_.
lg::redirect_output_setter::~redirect_output_setter | ( | ) |
Definition at line 296 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 118 of file log.hpp.
Referenced by ~redirect_output_setter().