25 #ifndef LOG4CPLUS_SPI_FILTER_HEADER_
26 #define LOG4CPLUS_SPI_FILTER_HEADER_
30 #if defined (LOG4CPLUS_HAVE_PRAGMA_ONCE)
66 class InternalLoggingEvent;
This filter drops all logging events.
DenyAllFilter(const log4cplus::helpers::Properties &)
virtual FilterResult decide(const InternalLoggingEvent &event) const
Always returns the DENY regardless of the InternalLoggingEvent parameter.
Users should extend this class to implement customized logging event filtering.
virtual FilterResult decide(const InternalLoggingEvent &event) const =0
If the decision is DENY, then the event will be dropped.
void appendFilter(FilterPtr filter)
Appends filter to the end of this filter chain.
FilterPtr next
Points to the next filter in the filter chain.
This filter allows using std::function<FilterResult(const InternalLoggingEvent &)>.
std::function< FilterResult(const InternalLoggingEvent &)> Function
virtual FilterResult decide(const InternalLoggingEvent &) const
Returns result returned by function.
The internal representation of logging events.
This is a very simple filter based on LogLevel matching.
LogLevelMatchFilter(const log4cplus::helpers::Properties &p)
virtual FilterResult decide(const InternalLoggingEvent &event) const
Return the decision of this filter.
This is a very simple filter based on LogLevel matching, which can be used to reject messages with Lo...
virtual FilterResult decide(const InternalLoggingEvent &event) const
Return the decision of this filter.
LogLevelRangeFilter(const log4cplus::helpers::Properties &p)
This is a simple filter based on the key/value pair stored in MDC.
virtual FilterResult decide(const InternalLoggingEvent &event) const
Returns NEUTRAL is there is no string match.
MDCMatchFilter(const log4cplus::helpers::Properties &p)
This is a simple filter based on the string returned by event.getNDC().
virtual FilterResult decide(const InternalLoggingEvent &event) const
Returns NEUTRAL is there is no string match.
NDCMatchFilter(const log4cplus::helpers::Properties &p)
This is a very simple filter based on string matching.
virtual FilterResult decide(const InternalLoggingEvent &event) const
Returns NEUTRAL is there is no string match.
StringMatchFilter(const log4cplus::helpers::Properties &p)
#define LOG4CPLUS_PRIVATE
This header defines the LogLevel type.
@ ACCEPT
The log event must be logged immediately without consulting with the remaining filters,...
@ DENY
The log event must be dropped immediately without consulting with the remaining filters,...
@ NEUTRAL
This filter is neutral with respect to the log event; the remaining filters, if if any,...
LOG4CPLUS_EXPORT FilterResult checkFilter(const Filter *filter, const InternalLoggingEvent &event)
This method is used to filter an InternalLoggingEvent.
helpers::SharedObjectPtr< Filter > FilterPtr
std::basic_string< tchar > tstring
int LogLevel
Defines the minimum set of priorities recognized by the system, that is FATAL_LOG_LEVEL,...