/** * Return a copy of the current thread's context map, with keys and values of * type String. Returned value may be null. * * @return A copy of the current thread's context map. May be null. * @since 1.5.1 */ public static Map<String, String> getCopyOfContextMap() { if (mdcAdapter == null) { throw new IllegalStateException("MDCAdapter cannot be null. See also " + NULL_MDCA_URL); } return mdcAdapter.getCopyOfContextMap(); }
/** * Return a copy of the current thread's context map, with keys and values of * type String. Returned value may be null. * * @return A copy of the current thread's context map. May be null. * @since 1.5.1 */ public static Map<String, String> getCopyOfContextMap() { if (mdcAdapter == null) { throw new IllegalStateException("MDCAdapter cannot be null. See also " + NULL_MDCA_URL); } return mdcAdapter.getCopyOfContextMap(); }
public Map<String, String> getMDCPropertyMap() { // populate mdcPropertyMap if null if (mdcPropertyMap == null) { MDCAdapter mdc = MDC.getMDCAdapter(); if (mdc instanceof LogbackMDCAdapter) mdcPropertyMap = ((LogbackMDCAdapter) mdc).getPropertyMap(); else mdcPropertyMap = mdc.getCopyOfContextMap(); } // mdcPropertyMap still null, use emptyMap() if (mdcPropertyMap == null) mdcPropertyMap = Collections.emptyMap(); return mdcPropertyMap; }
/** * Return a copy of the current thread's context map, with keys and values of * type String. Returned value may be null. * * @return A copy of the current thread's context map. May be null. * @since 1.5.1 */ public static Map getCopyOfContextMap() { if (mdcAdapter == null) { throw new IllegalStateException("MDCAdapter cannot be null. See also " + NULL_MDCA_URL); } return mdcAdapter.getCopyOfContextMap(); }
public Map<String, String> getMDCPropertyMap() { // populate mdcPropertyMap if null if (mdcPropertyMap == null) { MDCAdapter mdc = MDC.getMDCAdapter(); if (mdc instanceof LogbackMDCAdapter) mdcPropertyMap = ((LogbackMDCAdapter) mdc).getPropertyMap(); else mdcPropertyMap = mdc.getCopyOfContextMap(); } // mdcPropertyMap still null, use CACHED_NULL_MAP if (mdcPropertyMap == null) mdcPropertyMap = CACHED_NULL_MAP; return mdcPropertyMap; }
@Override public Map<String, String> getCopyOfContextMap() { return _delegate.getCopyOfContextMap(); }
/** * Return a copy of the current thread's context map, with keys and values of * type String. Returned value may be null. * * @return A copy of the current thread's context map. May be null. * @since 1.5.1 */ public static Map<String, String> getCopyOfContextMap() { if (mdcAdapter == null) { throw new IllegalStateException("MDCAdapter cannot be null. See also " + NULL_MDCA_URL); } return mdcAdapter.getCopyOfContextMap(); }
/** * Return a copy of the current thread's context map, with keys and values of * type String. Returned value may be null. * * @return A copy of the current thread's context map. May be null. * @since 1.5.1 */ public static Map<String, String> getCopyOfContextMap() { if (mdcAdapter == null) { throw new IllegalStateException("MDCAdapter cannot be null. See also " + NULL_MDCA_URL); } return mdcAdapter.getCopyOfContextMap(); }
/** * Return a copy of the current thread's context map, with keys and values of * type String. Returned value may be null. * * @return A copy of the current thread's context map. May be null. * @since 1.5.1 */ public static Map<String, String> getCopyOfContextMap() { if (mdcAdapter == null) { throw new IllegalStateException("MDCAdapter cannot be null. See also " + NULL_MDCA_URL); } return mdcAdapter.getCopyOfContextMap(); }
/** * Return a copy of the current thread's context map, with keys and values of * type String. Returned value may be null. * * @return A copy of the current thread's context map. May be null. * @since 1.5.1 */ public static Map<String, String> getCopyOfContextMap() { if (mdcAdapter == null) { throw new IllegalStateException("MDCAdapter cannot be null. See also " + NULL_MDCA_URL); } return mdcAdapter.getCopyOfContextMap(); }
/** * Return a copy of the current thread's context map, with keys and values of * type String. Returned value may be null. * * @return A copy of the current thread's context map. May be null. * @since 1.5.1 */ public static Map<String, String> getCopyOfContextMap() { if (mdcAdapter == null) { throw new IllegalStateException("MDCAdapter cannot be null. See also " + NULL_MDCA_URL); } return mdcAdapter.getCopyOfContextMap(); }
/** * Return a copy of the current thread's context map, with keys and values of * type String. Returned value may be null. * * @return A copy of the current thread's context map. May be null. * @since 1.5.1 */ public static Map<String, String> getCopyOfContextMap() { if (mdcAdapter == null) { throw new IllegalStateException("MDCAdapter cannot be null. See also " + NULL_MDCA_URL); } return mdcAdapter.getCopyOfContextMap(); }
/** * Return a copy of the current thread's context map, with keys and values of * type String. Returned value may be null. * * @return A copy of the current thread's context map. May be null. * @since 1.5.1 */ public static Map<String, String> getCopyOfContextMap() { if (mdcAdapter == null) { throw new IllegalStateException("MDCAdapter cannot be null. See also " + NULL_MDCA_URL); } return mdcAdapter.getCopyOfContextMap(); }
/** * Return a copy of the current thread's context map, with keys and values of * type String. Returned value may be null. * * @return A copy of the current thread's context map. May be null. * @since 1.5.1 */ public static Map getCopyOfContextMap() { if (mdcAdapter == null) { throw new IllegalStateException("MDCAdapter cannot be null. See also " + NULL_MDCA_URL); } return mdcAdapter.getCopyOfContextMap(); }
/** * Return a copy of the current thread's context map, with keys and values of * type String. Returned value may be null. * * @return A copy of the current thread's context map. May be null. * @since 1.5.1 */ public static Map getCopyOfContextMap() { if (mdcAdapter == null) { throw new IllegalStateException("MDCAdapter cannot be null. See also " + NULL_MDCA_URL); } return mdcAdapter.getCopyOfContextMap(); }
/** * Return a copy of the current thread's context map, with keys and values of * type String. Returned value may be null. * * @return A copy of the current thread's context map. May be null. * @since 1.5.1 */ public static Map getCopyOfContextMap() { if (mdcAdapter == null) { throw new IllegalStateException("MDCAdapter cannot be null. See also " + NULL_MDCA_URL); } return mdcAdapter.getCopyOfContextMap(); }
/** * Return a copy of the current thread's context map, with keys and values of * type String. Returned value may be null. * * @return A copy of the current thread's context map. May be null. * @since 1.5.1 */ public static Map<String, String> getCopyOfContextMap() { if (mdcAdapter == null) { throw new IllegalStateException("MDCAdapter cannot be null. See also " + NULL_MDCA_URL); } return mdcAdapter.getCopyOfContextMap(); }
@SuppressWarnings("unchecked") public EventVO() { id = io.cattle.platform.util.resource.UUID.randomUUID().toString(); time = new Date(); context = MDC.getMDCAdapter().getCopyOfContextMap(); }
public Map<String, String> getMDCPropertyMap() { // populate mdcPropertyMap if null if (mdcPropertyMap == null) { MDCAdapter mdc = MDC.getMDCAdapter(); if (mdc instanceof LogbackMDCAdapter) mdcPropertyMap = ((LogbackMDCAdapter) mdc).getPropertyMap(); else mdcPropertyMap = mdc.getCopyOfContextMap(); } // mdcPropertyMap still null, use emptyMap() if (mdcPropertyMap == null) mdcPropertyMap = Collections.emptyMap(); return mdcPropertyMap; }
public Map<String, String> getMDCPropertyMap() { // populate mdcPropertyMap if null if (mdcPropertyMap == null) { MDCAdapter mdc = MDC.getMDCAdapter(); if (mdc instanceof LogbackMDCAdapter) mdcPropertyMap = ((LogbackMDCAdapter) mdc).getPropertyMap(); else mdcPropertyMap = mdc.getCopyOfContextMap(); } // mdcPropertyMap still null, use emptyMap() if (mdcPropertyMap == null) mdcPropertyMap = Collections.emptyMap(); return mdcPropertyMap; }