CppLogging
1.0.4.0
C++ Logging Library
|
Level filter. More...
#include <level_filter.h>
Public Member Functions | |
LevelFilter (Level level, bool positive=true) | |
Initialize level filter with a given level value. More... | |
LevelFilter (Level from, Level to, bool positive=true) | |
Initialize level filter with a given level range. More... | |
LevelFilter (const LevelFilter &)=delete | |
LevelFilter (LevelFilter &&)=delete | |
virtual | ~LevelFilter ()=default |
LevelFilter & | operator= (const LevelFilter &)=delete |
LevelFilter & | operator= (LevelFilter &&)=delete |
bool | positive () const noexcept |
Get the positive filtration flag. More... | |
Level | from () const noexcept |
Get Level from value. More... | |
Level | to () const noexcept |
Get Level to value. More... | |
void | Update (Level level, bool positive=true) |
Update level filter with a given level value. More... | |
void | Update (Level from, Level to, bool positive=true) |
Update level filter with a given level range. 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... | |
Level filter.
Level filters out logging records which level filed is not matched to the given level value or range.
Thread-safe.
Definition at line 25 of file level_filter.h.
|
inlineexplicit |
Initialize level filter with a given level value.
level | - Level value |
positive | - Positive filtration (default is true) |
Definition at line 33 of file level_filter.h.
Initialize level filter with a given level range.
from | - Level from value |
to | - Level to value |
positive | - Positive filtration (default is true) |
Definition at line 40 of file level_filter.h.
|
delete |
|
delete |
|
virtualdefault |
|
overridevirtual |
Filter the given logging record.
record | - Logging record |
Implements CppLogging::Filter.
Definition at line 35 of file level_filter.cpp.
|
inlinenoexcept |
Get Level from value.
Definition at line 52 of file level_filter.h.
|
delete |
|
delete |
|
inlinenoexcept |
Get the positive filtration flag.
Definition at line 49 of file level_filter.h.
|
inlinenoexcept |
Get Level to value.
Definition at line 54 of file level_filter.h.
Update level filter with a given level range.
from | - Level from value |
to | - Level to value |
positive | - Positive filtration (default is true) |
Definition at line 20 of file level_filter.cpp.
void CppLogging::LevelFilter::Update | ( | Level | level, |
bool | positive = true |
||
) |
Update level filter with a given level value.
level | - Level value |
positive | - Positive filtration (default is true) |
Definition at line 13 of file level_filter.cpp.