log4cplus_spi_MDCMatchFilter(3)

log4cplus::spi::MDCMatchFilter(3) log4cplus log4cplus::spi::MDCMatchFilter(3)

NAME

log4cplus::spi::MDCMatchFilter - This is a simple filter based on the key/value pair stored in MDC.

SYNOPSIS

#include <filter.h>

Inherits log4cplus::spi::Filter.

Public Member Functions


MDCMatchFilter ()
MDCMatchFilter (const log4cplus::helpers::Properties &p)
virtual FilterResult decide (const InternalLoggingEvent &event) const
Returns NEUTRAL is there is no string match.

Additional Inherited Members

Detailed Description

This is a simple filter based on the key/value pair stored in MDC.

The filter admits four options NeutralOnEmpty, MDCKeyToMatch MDCValueToMatch and AcceptOnMatch.

If NeutralOnEmpty is true and MDCKeyToMatch or MDCValueToMatch is empty then NEUTRAL is returned.

If NeutralOnEmpty is true and the string returned by event.getMDC(MDCKeyToMatch) is empty then NEUTRAL is returned.

If the string returned by event.getMDC(MDCKeyToMatch) matches MDCValueToMatch, then if AcceptOnMatch is true, ACCEPT is returned, and if AcceptOnMatch is false, DENY is returned.

If the string returned by event.getMDC(MDCKeyToMatch) does not match MDCValueToMatch, then if AcceptOnMatch is true, DENY is returned, and if AcceptOnMatch is false, ACCEPT is returned.

Definition at line 374 of file filter.h.

Constructor & Destructor Documentation

log4cplus::spi::MDCMatchFilter::MDCMatchFilter ()

log4cplus::spi::MDCMatchFilter::MDCMatchFilter (const log4cplus::helpers::Properties & p)

Member Function Documentation

virtual FilterResult log4cplus::spi::MDCMatchFilter::decide (const InternalLoggingEvent & event) const [virtual]

Returns NEUTRAL is there is no string match.

Implements log4cplus::spi::Filter.

Author

Generated automatically by Doxygen for log4cplus from the source code.

Fri Jun 18 2021 Version 2.0.6