code: protected boolean match(LoggingEvent event) {
      // get the mdc value for the key from the event
      // use the toString() value of the value object
      Object mdcObject = event.getMDC(keyToMatch); //removed in Log4j-1.3
  //    Object mdcObject = MDC.get(keyToMatch);
      String mdcValue;
  
      if (mdcObject != null) {
        mdcValue = mdcObject.toString();
      } else {
        mdcValue = null;
      }
  
      // check for a match
      if (mdcValue == null) {
        return (valueToMatch == null);
      } else {
        if (valueToMatch != null) {
          if (exactMatch) {
            return mdcValue.equals(valueToMatch);
          } else {
            return (mdcValue.indexOf(valueToMatch) != -1);
          }
        } else {
          return false;
        }
      }
    }
docs: If <b>ExactMatch</b> is set to true, returns true only when
  <b>ValueToMatch</b> exactly matches the MDC value of the
  logging event. If the <b>ExactMatch</b> property
  is set to <code>false</code>, returns true when
  <b>ValueToMatch</b> is contained anywhere within the MDC
  value. Otherwise, false is returned.
  
  @param event The logging event to match against.
  @return boolean True if matches criteria.