|
AVPKit
|
This class records the Global logging levels when it is created, and, if it changes the Global logging level, restores it to the original values when it is destroyed. More...
#include <LoggerStack.h>
Public Member Functions | |
| void | setGlobalLevel (Logger::Level level, bool value) |
| If false, sets level and all lower levels to false. More... | |
This class records the Global logging levels when it is created, and, if it changes the Global logging level, restores it to the original values when it is destroyed.
It is handy to use in tests where you know a log (and hence error message) will be generated, but you want to temporarily turn off logging when the test runs.
Definition at line 37 of file LoggerStack.h.
| void com::avpkit::ferry::LoggerStack::setGlobalLevel | ( | Logger::Level | level, |
| bool | value | ||
| ) |
If false, sets level and all lower levels to false.
If true, sets current level to true, and all lower levels to original value.
| level | The level to set. |
| value | Whether to log (true) or not (false). |
Definition at line 50 of file LoggerStack.cpp.