Merge branch 'master' of github.com:qos-ch/slf4j

This commit is contained in:
Ceki Gulcu 2014-11-25 23:27:33 +01:00
commit 8110cbf1c7
1 changed files with 20 additions and 0 deletions

View File

@ -16,6 +16,9 @@
package org.apache.log4j;
import java.util.Hashtable;
import java.util.Map;
public class MDC {
public static void put(String key, String value) {
@ -41,4 +44,21 @@ public class MDC {
public static void clear() {
org.slf4j.MDC.clear();
}
/**
* This method is not part of the Log4J public API. However it
* has been called by other projects. This method is here temporarily
* until projects who are depending on this method release fixes.
*/
@Deprecated
public static Hashtable getContext() {
Map map = org.slf4j.MDC.getCopyOfContextMap();
if (map != null) {
return new Hashtable(map);
}
else {
return new Hashtable();
}
}
}