Base filter class.
More...
#include <Filter.h>
|
| Filter (std::string filter_name) |
| Constructor. More...
|
|
virtual | ~Filter ()=default |
| Destructor.
|
|
virtual QUILL_NODISCARD bool | filter (MacroMetadata const *log_metadata, uint64_t log_timestamp, std::string_view thread_id, std::string_view thread_name, std::string_view logger_name, LogLevel log_level, std::string_view log_message, std::string_view log_statement) noexcept=0 |
| Filters a log message. More...
|
|
virtual QUILL_NODISCARD std::string const & | get_filter_name () const noexcept |
| Gets the name of the filter. More...
|
|
Base filter class.
Filters can be added to Sinks
◆ Filter()
Filter::Filter |
( |
std::string |
filter_name | ) |
|
|
inlineexplicit |
Constructor.
- Parameters
-
filter_name | unique filter name |
◆ filter()
virtual QUILL_NODISCARD bool Filter::filter |
( |
MacroMetadata const * |
log_metadata, |
|
|
uint64_t |
log_timestamp, |
|
|
std::string_view |
thread_id, |
|
|
std::string_view |
thread_name, |
|
|
std::string_view |
logger_name, |
|
|
LogLevel |
log_level, |
|
|
std::string_view |
log_message, |
|
|
std::string_view |
log_statement |
|
) |
| |
|
pure virtualnoexcept |
Filters a log message.
- Parameters
-
log_metadata | Pointer to the macro metadata. |
log_timestamp | Timestamp of the log event. |
thread_id | ID of the thread. |
thread_name | Name of the thread. |
logger_name | Name of the logger. |
log_level | Log level of the message. |
log_message | The log message. |
log_statement | The log statement. |
- Returns
- true if the log message should be written to the file, false otherwise
◆ get_filter_name()
virtual QUILL_NODISCARD std::string const& Filter::get_filter_name |
( |
| ) |
const |
|
inlinevirtualnoexcept |
Gets the name of the filter.
Only useful if an existing filter is needed to be looked up
- Returns
- the name of the filter
The documentation for this class was generated from the following file: