|
morph 0.1.0
Asynchronous bridge between GUI thread and business models
|
RAII helper that installs a default action log for its lifetime and restores the previous one on destruction. More...
#include <action_log.hpp>
Public Member Functions | |
| ScopedActionLog (std::shared_ptr< IActionLog > log) | |
Installs log as the default, saving whatever was there before. | |
| ~ScopedActionLog () | |
| Restores the saved default. | |
| ScopedActionLog (const ScopedActionLog &)=delete | |
| ScopedActionLog & | operator= (const ScopedActionLog &)=delete |
| ScopedActionLog (ScopedActionLog &&)=delete | |
| ScopedActionLog & | operator= (ScopedActionLog &&)=delete |
RAII helper that installs a default action log for its lifetime and restores the previous one on destruction.
Mirrors morph::log::ScopedLoggerOverride. Intended for tests (so one test case's sink never leaks into the next) and for applications that need to temporarily redirect auto-attached logging within a scope.
Definition at line 437 of file action_log.hpp.
|
inlineexplicit |
Installs log as the default, saving whatever was there before.
| log | New default for the lifetime of this object. |
Definition at line 441 of file action_log.hpp.
|
inline |
Restores the saved default.
Definition at line 446 of file action_log.hpp.