CppLogging
1.0.4.0
C++ Logging Library
|
Switch filter. More...
#include <switch_filter.h>
Public Member Functions | |
SwitchFilter (bool enabled) | |
Initialize switch filter with a given enabled flag. More... | |
SwitchFilter (const SwitchFilter &)=delete | |
SwitchFilter (SwitchFilter &&)=delete | |
virtual | ~SwitchFilter ()=default |
SwitchFilter & | operator= (const SwitchFilter &)=delete |
SwitchFilter & | operator= (SwitchFilter &&)=delete |
bool | enabled () const noexcept |
Get the filter enabled flag. More... | |
void | Update (bool enabled) |
Update switch filter with a given enabled flag. More... | |
bool | FilterRecord (Record &record) override |
Filter the given logging record. More... | |
Public Member Functions inherited from CppLogging::Element | |
virtual bool | IsStarted () const noexcept |
Is the logging element started? More... | |
virtual bool | Start () |
Start the logging element. More... | |
virtual bool | Stop () |
Stop the logging element. More... | |
Switch filter.
Switch filters is used to turn on/off logging.
Thread-safe.
Definition at line 24 of file switch_filter.h.
|
inlineexplicit |
Initialize switch filter with a given enabled flag.
enabled | - Enabled flag |
Definition at line 31 of file switch_filter.h.
|
delete |
|
delete |
|
virtualdefault |
|
inlinenoexcept |
Get the filter enabled flag.
Definition at line 40 of file switch_filter.h.
|
overridevirtual |
Filter the given logging record.
record | - Logging record |
Implements CppLogging::Filter.
Definition at line 18 of file switch_filter.cpp.
|
delete |
|
delete |
void CppLogging::SwitchFilter::Update | ( | bool | enabled | ) |
Update switch filter with a given enabled flag.
enabled | - Enabled flag |
Definition at line 13 of file switch_filter.cpp.