|
Logger System 0.1.3
High-performance C++20 thread-safe logging system with asynchronous capabilities
|
Combine multiple filters with AND/OR logic. More...
#include <log_filter.h>


Public Types | |
| enum class | logic_type { AND , OR } |
Public Member Functions | |
| composite_filter (logic_type logic=logic_type::AND) | |
| void | add_filter (std::unique_ptr< log_filter > filter) |
| bool | should_log (log_level level, const std::string &message, const std::string &file, int line, const std::string &function) const override |
| Check if a log entry should be processed (legacy API) | |
| std::string | get_name () const override |
| Get the name of this filter. | |
Public Member Functions inherited from kcenon::logger::log_filter | |
| virtual | ~log_filter ()=default |
| virtual bool | should_log (const log_entry &entry) const override |
| Check if a log entry should be processed (new interface) | |
Public Member Functions inherited from kcenon::logger::log_filter_interface | |
| virtual | ~log_filter_interface ()=default |
Private Attributes | |
| logic_type | logic_ |
| std::vector< std::unique_ptr< log_filter > > | filters_ |
Combine multiple filters with AND/OR logic.
Definition at line 167 of file log_filter.h.
|
strong |
|
inlineexplicit |
Definition at line 174 of file log_filter.h.
|
inline |
Definition at line 177 of file log_filter.h.
References filters_.
|
inlineoverridevirtual |
Get the name of this filter.
Reimplemented from kcenon::logger::log_filter.
Definition at line 207 of file log_filter.h.
|
inlineoverridevirtual |
Check if a log entry should be processed (legacy API)
| level | Log level |
| message | Log message |
| file | Source file |
| line | Source line |
| function | Function name |
Implements kcenon::logger::log_filter.
Definition at line 181 of file log_filter.h.
|
private |
Definition at line 213 of file log_filter.h.
Referenced by add_filter(), and should_log().
|
private |
Definition at line 212 of file log_filter.h.
Referenced by should_log().