Collection of filterable objects for logging control 더 자세히 ...
#include <filters.hpp>
Public 멤버 함수 | |
| template<typename... Es> | |
| filters (const Es *... elems) | |
| Constructs a filters object with multiple filterable elements. | |
| ncnt | len () const |
| void | rel () |
| Clears all contained filterable objects without deleting them. | |
| void | add (const filterable &new1) |
| Adds a filterable object to the collection. | |
| void | add (const filterable *new1) |
| Adds a filterable object to the collection. | |
| void | del () |
| Deletes all owned filterable objects and clears the collection. | |
| nbool | filt (errLv::level lv, const std::string &tag) const |
| Applies all contained filters to the log entry. | |
Collection of filterable objects for logging control
Manages multiple filterable objects registered in the logger class. Provides the same API as filterable, and calling an API on filters will invoke that API on all owned filterable objects.
Acts as a composite filter, allowing multiple filtering criteria to be applied to log messages simultaneously.
Constructs a filters object with multiple filterable elements.
This variadic template constructor allows convenient initialization of the filters object by adding multiple filterable instances.
| Es | Type of the filterable elements (must be convertible to filterable*). |
| elems | Pointers to the filterable objects to add. |
| void by::filters::add | ( | const filterable & | new1 | ) |
Adds a filterable object to the collection.
| new1 | The filterable object to add. The filters object does not take ownership. |
| void by::filters::add | ( | const filterable * | new1 | ) |
Adds a filterable object to the collection.
| new1 | Pointer to the filterable object to add. The filters object does not take ownership. |
| void by::filters::del | ( | ) |
Deletes all owned filterable objects and clears the collection.
|
virtual |
Applies all contained filters to the log entry.
This method returns true if any of the contained filterable objects return true for the given log entry, indicating it should be filtered out.
| lv | The error level of the log entry. |
| tag | The tag associated with the log entry. |
by::filterable를 구현.