[logback-dev] svn commit: r1700 - logback/trunk/logback-classic/src/main/java/org/slf4j/impl

noreply.ceki at qos.ch noreply.ceki at qos.ch
Tue May 27 20:36:24 CEST 2008


Author: ceki
Date: Tue May 27 20:36:24 2008
New Revision: 1700

Modified:
   logback/trunk/logback-classic/src/main/java/org/slf4j/impl/LogbackMDCAdapter.java

Log:
- catching up with SLF4J 1.5.1 by adding the getCopyOfPropertyMap

Modified: logback/trunk/logback-classic/src/main/java/org/slf4j/impl/LogbackMDCAdapter.java
==============================================================================
--- logback/trunk/logback-classic/src/main/java/org/slf4j/impl/LogbackMDCAdapter.java	(original)
+++ logback/trunk/logback-classic/src/main/java/org/slf4j/impl/LogbackMDCAdapter.java	Tue May 27 20:36:24 2008
@@ -121,6 +121,20 @@
   }
 
   /**
+   * Return a copy of the current thread's context map. 
+   * Returned value may be null.
+   */
+  public Map getCopyOfPropertyMap() {
+    HashMap<String, String> hashMap = inheritableThreadLocal.get();
+    if (hashMap == null) {
+      return null;
+    } else {
+      return new HashMap<String, String>(hashMap);
+    }
+  }
+
+  
+  /**
    * Returns the keys in the MDC as a {@link Set}. The returned value can be
    * null.
    */



More information about the logback-dev mailing list