public static MDCCloseable putCloseable(String key, String val) throws IllegalArgumentException {
        put(key, val);
        return new MDCCloseable(key);
    }
Put a diagnostic context value (the <code>val</code> parameter) as identified with the
<code>key</code> parameter into the current thread's diagnostic context map. The
<code>key</code> parameter cannot be null. The <code>val</code> parameter
can be null only if the underlying implementation supports it.

<p>
This method delegates all work to the MDC of the underlying logging system.
<p>
This method return a <code>Closeable</code> object who can remove <code>key</code> when
<code>close</code> is called.

<p>
Useful with Java 7 for example :
<code>
  try(MDC.MDCCloseable closeable = MDC.putCloseable(key, value)) {
    ....
  }
</code>

@param key non-null key
@param val value to put in the map
@return a <code>Closeable</code> who can remove <code>key</code> when <code>close</code>
is called.

@throws IllegalArgumentException
          in case the "key" parameter is null
slf4j-api/src/main/java/org/slf4j/MDC.java