9 #include "quill/core/Attributes.h" 10 #include "quill/core/LogLevel.h" 14 #include <string_view> 33 explicit Filter(std::string filter_name) : _filter_name(
std::move(filter_name)) {}
54 QUILL_NODISCARD
virtual bool filter(
MacroMetadata const* log_metadata, uint64_t log_timestamp,
55 std::string_view thread_id, std::string_view thread_name,
56 std::string_view logger_name, LogLevel log_level, std::string_view log_message,
57 std::string_view log_statement) noexcept = 0;
69 std::string _filter_name;
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.
virtual ~Filter()=default
Destructor.
Base filter class.
Definition: Filter.h:26
Filter(std::string filter_name)
Constructor.
Definition: Filter.h:33
virtual QUILL_NODISCARD std::string const & get_filter_name() const noexcept
Gets the name of the filter.
Definition: Filter.h:63