The purpose of this class is to change the current thread's global LogAppenderRef during an instance's lifetime.
More...
The purpose of this class is to change the current thread's global LogAppenderRef during an instance's lifetime.
The destructor will restore the previous thread LogAppenderRef.
A couple of common uses:
- Disable logging completely: LogAppenderScope las(LogAppenderRef(new NullAppender()));
- Redirect logging to a custom appender: LogAppenderScope las(LogAppenderRef(new MyCustomLogAppender()));
Definition at line 89 of file LogAppenderScope.hpp.