|
MIRA
|
A customizable log filter to match the users needs. More...
#include <error/LogCustomizableFilter.h>

Classes | |
| class | AndOperator |
| Operator class used to combine two custom filters by the & operator. More... | |
| class | Class |
| Class filter, used to filter log entries with a given class name. More... | |
| class | CustomFilter |
| Helper class to get the type info of the derived class. More... | |
| class | CustomFilterBase |
| Abstract base class for custom filters. More... | |
| class | Namespace |
| Namespace filter, used to filter log entries with a given namespace. More... | |
| class | OrOperator |
| Operator class used to combine two custom filters by the | operator. More... | |
| class | Severity |
| Severity filter, used to filter log entries with a given severity level. More... | |
| class | Thread |
| ThreadID filter, used to filter log entries with a given thread id. More... | |
Public Types | |
| enum | CompareFlags { LESS = 0, LESS_EQUAL, EQUAL, GREATER_EQUAL, GREATER, NOT } |
Public Member Functions | |
| template<typename T > | |
| LogCustomizableFilter & | operator<< (const T &f) |
| Add filters by chaining them with this operator. More... | |
| virtual bool | filter (const LogRecord &record) |
| Filters a log entry. More... | |
Protected Attributes | |
| std::vector< boost::shared_ptr< LogCustomizableFilter::CustomFilterBase > > | mFilter |
A customizable log filter to match the users needs.
e.g.
will only log messages that have a severity of CRITICAL or ERROR and come from the class MyClass. That way sinks can be configured to log only a special part of the log entries. Custom filters can be combined by & and | operators. An unlikely but possible thing to do would be having registered a file sink for each namespace/class and sort the messages from different namespaces/classes into different files.
More filters can be added by deriving from LogCustomizableFilter::CustomFilter. The new filter can be chained by adding it via the << operator to the LogCustomizableFilter instance.
| enum CompareFlags |
|
inline |
Add filters by chaining them with this operator.
| f | The filter to add |
|
inlinevirtual |
Filters a log entry.
| record | The log entry. |
Implements LogFilterBase.
|
protected |
1.8.14