/** * Synonym for [@link #getMDCPropertyMap}. * * @deprecated Replaced by [@link #getMDCPropertyMap} */ public Map<String, String> getMdc() { return getMDCPropertyMap(); }
/** * This method should be called prior to serializing an event. It should also * be called when using asynchronous or deferred logging. * <p/> * <p/> * Note that due to performance concerns, this method does NOT extract caller * data. It is the responsibility of the caller to extract caller information. */ public void prepareForDeferredProcessing() { this.getFormattedMessage(); this.getThreadName(); // fixes http://jira.qos.ch/browse/LBCLASSIC-104 this.getMDCPropertyMap(); }
/** * Synonym for [@link #getMDCPropertyMap}. * * @deprecated Replaced by [@link #getMDCPropertyMap} */ public Map<String, String> getMdc() { return getMDCPropertyMap(); }
/** * This method should be called prior to serializing an event. It should also * be called when using asynchronous or deferred logging. * <p/> * <p/> * Note that due to performance concerns, this method does NOT extract caller * data. It is the responsibility of the caller to extract caller information. */ public void prepareForDeferredProcessing() { this.getFormattedMessage(); this.getThreadName(); // fixes http://jira.qos.ch/browse/LBCLASSIC-104 this.getMDCPropertyMap(); }
/** * Synonym for [@link #getMDCPropertyMap}. * * @deprecated Replaced by [@link #getMDCPropertyMap} */ public Map<String, String> getMdc() { return getMDCPropertyMap(); }
/** * Synonym for [@link #getMDCPropertyMap}. * * @deprecated Replaced by [@link #getMDCPropertyMap} */ public Map<String, String> getMdc() { return getMDCPropertyMap(); }
/** * Synonym for [@link #getMDCPropertyMap}. * * @deprecated Replaced by [@link #getMDCPropertyMap} */ public Map<String, String> getMdc() { return getMDCPropertyMap(); }
/** * Synonym for [@link #getMDCPropertyMap}. * @deprecated Replaced by [@link #getMDCPropertyMap} */ public Map<String, String> getMdc() { return getMDCPropertyMap(); }
/** * Synonym for [@link #getMDCPropertyMap}. * * @deprecated Replaced by [@link #getMDCPropertyMap} */ public Map<String, String> getMdc() { return getMDCPropertyMap(); }
/** * This method should be called prior to serializing an event. It should also * be called when using asynchronous or deferred logging. * <p> * Note that due to performance concerns, this method does NOT extract caller * data. It is the responsibility of the caller to extract caller information. */ public void prepareForDeferredProcessing() { this.getFormattedMessage(); this.getThreadName(); // fixes http://jira.qos.ch/browse/LBCLASSIC-104 this.getMDCPropertyMap(); }
/** * This method should be called prior to serializing an event. It should also * be called when using asynchronous or deferred logging. * * <p> * Note that due to performance concerns, this method does NOT extract caller * data. It is the responsibility of the caller to extract caller information. */ public void prepareForDeferredProcessing() { this.getFormattedMessage(); this.getThreadName(); // fixes http://jira.qos.ch/browse/LBCLASSIC-104 this.getMDCPropertyMap(); }
/** * This method should be called prior to serializing an event. It should also * be called when using asynchronous or deferred logging. * <p/> * <p/> * Note that due to performance concerns, this method does NOT extract caller * data. It is the responsibility of the caller to extract caller information. */ public void prepareForDeferredProcessing() { this.getFormattedMessage(); this.getThreadName(); // fixes http://jira.qos.ch/browse/LBCLASSIC-104 this.getMDCPropertyMap(); }
/** * This method should be called prior to serializing an event. It should also * be called when using asynchronous or deferred logging. * <p/> * <p/> * Note that due to performance concerns, this method does NOT extract caller * data. It is the responsibility of the caller to extract caller information. */ public void prepareForDeferredProcessing() { this.getFormattedMessage(); this.getThreadName(); // fixes http://jira.qos.ch/browse/LBCLASSIC-104 this.getMDCPropertyMap(); }
/** * This method should be called prior to serializing an event. It should also * be called when using asynchronous or deferred logging. * <p/> * <p/> * Note that due to performance concerns, this method does NOT extract caller * data. It is the responsibility of the caller to extract caller information. */ public void prepareForDeferredProcessing() { this.getFormattedMessage(); this.getThreadName(); // fixes http://jira.qos.ch/browse/LBCLASSIC-104 this.getMDCPropertyMap(); }
@Test public void nullMDC() { event = new LoggingEvent("a", logger, Level.DEBUG, "", null, null); assertTrue(event.getMDCPropertyMap().isEmpty()); String discriminatorValue = discriminator.getDiscriminatingValue(event); assertEquals(DEFAULT_VAL, discriminatorValue); } }
@Override public FilterReply decide(LoggingEvent event) { if (!isStarted()) { return FilterReply.NEUTRAL; } if (!hasLoggerOrAncestor(event.getLoggerName())) { return FilterReply.NEUTRAL; } String mdcValue = event.getMDCPropertyMap().get(MDC_KEY); Level levelAssociatedWithMDCValue = null; if (mdcValue != null) { levelAssociatedWithMDCValue = Level.toLevel(mdcValue); } if (levelAssociatedWithMDCValue == null) { levelAssociatedWithMDCValue = defaultThreshold; } if (event.getLevel().isGreaterOrEqual(levelAssociatedWithMDCValue)) { return onHigherOrEqual; } else { return onLower; } } }
ex.writeInt(argLen); Map<String, String> mdcProps = evt.getMDCPropertyMap(); int propsLen = (null != mdcProps ? mdcProps.size() : 0); ex.writeInt(propsLen); for (Map.Entry<String, String> entry : evt.getMDCPropertyMap().entrySet()) { ex.writeUTF(entry.getKey()); ex.writeUTF(entry.getValue());
ex.writeInt(argLen); Map<String, String> mdcProps = evt.getMDCPropertyMap(); int propsLen = (null != mdcProps ? mdcProps.size() : 0); ex.writeInt(propsLen); for (Map.Entry<String, String> entry : evt.getMDCPropertyMap().entrySet()) { ex.writeUTF(entry.getKey()); ex.writeUTF(entry.getValue());