DCMTK Version 3.7.1
OFFIS DICOM Toolkit
Loading...
Searching...
No Matches
dcmtk::log4cplus::spi::MDCMatchFilter Class Reference

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

Inheritance diagram for dcmtk::log4cplus::spi::MDCMatchFilter:

Public Member Functions

virtual FilterResult decide (const InternalLoggingEvent &event) const
 Returns NEUTRAL if there is no string match.
Public Member Functions inherited from dcmtk::log4cplus::spi::Filter
void appendFilter (FilterPtr filter)
 Appends filter to the end of this filter chain.

Private Attributes

bool acceptOnMatch
 Do we return ACCEPT when a match occurs.
bool neutralOnEmpty
 return NEUTRAL if mdcKeyToMatch is empty or event::getMDC(mdcKeyValue) is empty or mdcValueToMatch is empty.
log4cplus::tstring mdcKeyToMatch
 The MDC key to retrieve.
log4cplus::tstring mdcValueToMatch
 the MDC value to match

Additional Inherited Members

Public Attributes inherited from dcmtk::log4cplus::spi::Filter
FilterPtr next
 Points to the next filter in the filter chain.

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.

This class has been backported from log4plus version 2.1.2.

Member Data Documentation

◆ acceptOnMatch

bool dcmtk::log4cplus::spi::MDCMatchFilter::acceptOnMatch
private

Do we return ACCEPT when a match occurs.

Default is true.

◆ neutralOnEmpty

bool dcmtk::log4cplus::spi::MDCMatchFilter::neutralOnEmpty
private

return NEUTRAL if mdcKeyToMatch is empty or event::getMDC(mdcKeyValue) is empty or mdcValueToMatch is empty.

Default is true.


The documentation for this class was generated from the following file:


Generated on for DCMTK Version 3.7.1 by Doxygen 1.18.0