### Eclipse Workspace Patch 1.0
#P ch.qos.logback.classic
Index: source-bundle/ch/qos/logback/classic/spi/LogbackMDCAdapter.java
===================================================================
RCS file: source-bundle/ch/qos/logback/classic/spi/LogbackMDCAdapter.java
diff -N source-bundle/ch/qos/logback/classic/spi/LogbackMDCAdapter.java
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ source-bundle/ch/qos/logback/classic/spi/LogbackMDCAdapter.java	1 Jan 1970 00:00:00 -0000
@@ -0,0 +1,182 @@
+/**
+ * Logback: the reliable, generic, fast and flexible logging framework.
+ * Copyright (C) 1999-2009, QOS.ch. All rights reserved.
+ *
+ * This program and the accompanying materials are dual-licensed under
+ * either the terms of the Eclipse Public License v1.0 as published by
+ * the Eclipse Foundation
+ *
+ *   or (per the licensee's choosing)
+ *
+ * under the terms of the GNU Lesser General Public License version 2.1
+ * as published by the Free Software Foundation.
+ */
+package ch.qos.logback.classic.spi;
+
+import java.util.HashMap;
+import java.util.Map;
+import java.util.Set;
+
+import org.slf4j.spi.MDCAdapter;
+
+import ch.qos.logback.classic.util.CopyOnInheritThreadLocal;
+
+/**
+ * A <em>Mapped Diagnostic Context</em>, or MDC in short, is an instrument for
+ * distinguishing interleaved log output from different sources. Log output is
+ * typically interleaved when a server handles multiple clients
+ * near-simultaneously.
+ * <p>
+ * <b><em>The MDC is managed on a per thread basis</em></b>. A child thread
+ * automatically inherits a <em>copy</em> of the mapped diagnostic context of
+ * its parent.
+ * <p>
+ * For more information about MDC, please refer to the online manual at
+ * http://logback.qos.ch/manual/mdc.html
+ * 
+ * @author Ceki G&uuml;lc&uuml;
+ */
+public class LogbackMDCAdapter implements MDCAdapter {
+
+	// final CopyOnInheritThreadLocal copyOnInheritThreadLocal = new
+	// CopyOnInheritThreadLocal();
+
+	final CopyOnInheritThreadLocal copyOnInheritThreadLocal = new CopyOnInheritThreadLocal();
+
+	/**
+	 * Should not be instantiated directly.
+	 */
+	public LogbackMDCAdapter() {
+	}
+
+	/**
+	 * Clear all entries in the MDC.
+	 */
+	public void clear() {
+		final HashMap<String, String> hashMap = copyOnInheritThreadLocal.get();
+
+		if (hashMap != null) {
+			hashMap.clear();
+			copyOnInheritThreadLocal.remove();
+		}
+	}
+
+	/**
+	 * Get the context identified by the <code>key</code> parameter.
+	 * <p>
+	 * This method has no side effects.
+	 */
+	public String get(final String key) {
+		final HashMap<String, String> hashMap = copyOnInheritThreadLocal.get();
+
+		if ((hashMap != null) && (key != null)) {
+			return hashMap.get(key);
+		} else {
+			return null;
+		}
+	}
+
+	/**
+	 * Return a copy of the current thread's context map. Returned value may be
+	 * null.
+	 */
+	public Map getCopyOfContextMap() {
+		final HashMap<String, String> hashMap = copyOnInheritThreadLocal.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.
+	 */
+	public Set<String> getKeys() {
+		final HashMap<String, String> hashMap = copyOnInheritThreadLocal.get();
+
+		if (hashMap != null) {
+			return hashMap.keySet();
+		} else {
+			return null;
+		}
+	}
+
+	/**
+	 * Get the current thread's MDC as a map. This method is intended to be used
+	 * internally.
+	 */
+	public Map<String, String> getPropertyMap() {
+		return copyOnInheritThreadLocal.get();
+	}
+
+	/**
+	 * Put a context value (the <code>val</code> parameter) as identified with
+	 * the <code>key</code> parameter into the current thread's context map.
+	 * Note that contrary to log4j, the <code>val</code> parameter can be null.
+	 * <p>
+	 * If the current thread does not have a context map it is created as a side
+	 * effect of this call.
+	 * <p>
+	 * Each time a value is added, a new instance of the map is created. This is
+	 * to be certain that the serialization process will operate on the updated
+	 * map and not send a reference to the old map, thus not allowing the remote
+	 * logback component to see the latest changes.
+	 * 
+	 * @throws IllegalArgumentException
+	 *             in case the "key" parameter is null
+	 */
+	public void put(final String key, final String val) throws IllegalArgumentException {
+		if (key == null) {
+			throw new IllegalArgumentException("key cannot be null");
+		}
+
+		final HashMap<String, String> oldMap = copyOnInheritThreadLocal.get();
+
+		final HashMap<String, String> newMap = new HashMap<String, String>();
+		if (oldMap != null) {
+			newMap.putAll(oldMap);
+		}
+		// the newMap replaces the old one for serialisation's sake
+		copyOnInheritThreadLocal.set(newMap);
+		newMap.put(key, val);
+	}
+
+	/**
+	 * Remove the the context identified by the <code>key</code> parameter.
+	 * <p>
+	 * Each time a value is removed, a new instance of the map is created. This
+	 * is to be certain that the serialization process will operate on the
+	 * updated map and not send a reference to the old map, thus not allowing
+	 * the remote logback component to see the latest changes.
+	 */
+	public void remove(final String key) {
+		final HashMap<String, String> oldMap = copyOnInheritThreadLocal.get();
+
+		final HashMap<String, String> newMap = new HashMap<String, String>();
+		if (oldMap != null) {
+			newMap.putAll(oldMap);
+		}
+		// the newMap replaces the old one for serialisation's sake
+		copyOnInheritThreadLocal.set(newMap);
+		newMap.remove(key);
+	}
+
+	@SuppressWarnings("unchecked")
+	public void setContextMap(final Map contextMap) {
+		HashMap<String, String> oldMap = copyOnInheritThreadLocal.get();
+
+		final HashMap<String, String> newMap = new HashMap<String, String>();
+		newMap.putAll(contextMap);
+
+		// the newMap replaces the old one for serialisation's sake
+		copyOnInheritThreadLocal.set(newMap);
+
+		// hints for the garbage collector
+		if (oldMap != null) {
+			oldMap.clear();
+			oldMap = null;
+		}
+	}
+}
Index: source-bundle/ch/qos/logback/classic/spi/LoggingEvent.java
===================================================================
RCS file: /cvsroot/tools/org.eclipse.orbit/ch.qos.logback.classic/source-bundle/ch/qos/logback/classic/spi/Attic/LoggingEvent.java,v
retrieving revision 1.1.2.1
diff -u -r1.1.2.1 LoggingEvent.java
--- source-bundle/ch/qos/logback/classic/spi/LoggingEvent.java	21 Jan 2010 13:35:01 -0000	1.1.2.1
+++ source-bundle/ch/qos/logback/classic/spi/LoggingEvent.java	4 Feb 2010 09:38:30 -0000
@@ -19,7 +19,6 @@
 import org.slf4j.MDC;
 import org.slf4j.Marker;
 import org.slf4j.helpers.MessageFormatter;
-import org.slf4j.impl.LogbackMDCAdapter;
 
 import ch.qos.logback.classic.Level;
 import ch.qos.logback.classic.Logger;
@@ -29,13 +28,13 @@
  * The internal representation of logging events. When an affirmative decision
  * is made to log then a <code>LoggingEvent</code> instance is created. This
  * instance is passed around to the different logback-classic components.
- * 
+ *
  * <p> Writers of logback-classic components such as appenders should be aware
  * of that some of the LoggingEvent fields are initialized lazily. Therefore, an
  * appender wishing to output data to be later correctly read by a receiver,
  * must initialize "lazy" fields prior to writing them out. See the
  * {@link #prepareForDeferredProcessing()} method for the exact list. </p>
- * 
+ *
  * @author Ceki G&uuml;lc&uuml;
  * @author S&eacute;bastien Pennec
  */
@@ -44,7 +43,7 @@
   /**
    * Fully qualified name of the calling Logger class. This field does not
    * survive serialization.
-   * 
+   *
    * <p> Note that the getCallerInformation() method relies on this fact.
    */
   transient String fqnOfLoggerClass;
@@ -60,10 +59,10 @@
 
   /**
    * Level of logging event.
-   * 
+   *
    * <p> This field should not be accessed directly. You shoud use the {@link
    * #getLevel} method instead. </p>
-   * 
+   *
    */
   private transient Level level;
 
@@ -187,7 +186,7 @@
   /**
    * 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.
@@ -240,7 +239,7 @@
    * Get the caller information for this logging event. If caller information is
    * null at the time of its invocation, this method extracts location
    * information. The collected information is cached for future use.
-   * 
+   *
    * <p> Note that after serialization it is impossible to correctly extract
    * caller information. </p>
    */
Index: source-bundle/ch/qos/logback/classic/util/CopyOnInheritThreadLocal.java
===================================================================
RCS file: source-bundle/ch/qos/logback/classic/util/CopyOnInheritThreadLocal.java
diff -N source-bundle/ch/qos/logback/classic/util/CopyOnInheritThreadLocal.java
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ source-bundle/ch/qos/logback/classic/util/CopyOnInheritThreadLocal.java	1 Jan 1970 00:00:00 -0000
@@ -0,0 +1,41 @@
+/**
+ * Logback: the reliable, generic, fast and flexible logging framework.
+ * Copyright (C) 1999-2009, QOS.ch. All rights reserved.
+ *
+ * This program and the accompanying materials are dual-licensed under
+ * either the terms of the Eclipse Public License v1.0 as published by
+ * the Eclipse Foundation
+ *
+ *   or (per the licensee's choosing)
+ *
+ * under the terms of the GNU Lesser General Public License version 2.1
+ * as published by the Free Software Foundation.
+ */
+package ch.qos.logback.classic.util;
+
+import java.util.HashMap;
+
+/**
+ * This class extends InheritableThreadLocal so that children threads get a copy
+ * of the parent's hashmap.
+ * 
+ * @author Ceki G&uuml;lc&uuml;
+ */
+public class CopyOnInheritThreadLocal extends
+    InheritableThreadLocal<HashMap<String, String>> {
+
+  /**
+   * Child threads should get a copy of the parent's hashmap.
+   */
+  @Override
+  protected HashMap<String, String> childValue(
+      HashMap<String, String> parentValue) {
+    if (parentValue == null) {
+      return null;
+    } else {
+      HashMap<String, String> hm = new HashMap<String, String>(parentValue);
+      return hm;
+    }
+  }
+
+}
#P ch.qos.logback.slf4j
Index: source-bundle/org/slf4j/impl/CopyOnInheritThreadLocal.java
===================================================================
RCS file: source-bundle/org/slf4j/impl/CopyOnInheritThreadLocal.java
diff -N source-bundle/org/slf4j/impl/CopyOnInheritThreadLocal.java
--- source-bundle/org/slf4j/impl/CopyOnInheritThreadLocal.java	21 Jan 2010 13:34:42 -0000	1.1.2.1
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,41 +0,0 @@
-/**
- * Logback: the reliable, generic, fast and flexible logging framework.
- * Copyright (C) 1999-2009, QOS.ch. All rights reserved.
- *
- * This program and the accompanying materials are dual-licensed under
- * either the terms of the Eclipse Public License v1.0 as published by
- * the Eclipse Foundation
- *
- *   or (per the licensee's choosing)
- *
- * under the terms of the GNU Lesser General Public License version 2.1
- * as published by the Free Software Foundation.
- */
-package org.slf4j.impl;
-
-import java.util.HashMap;
-
-/**
- * This class extends InheritableThreadLocal so that children threads get a copy
- * of the parent's hashmap.
- * 
- * @author Ceki G&uuml;lc&uuml;
- */
-public class CopyOnInheritThreadLocal extends
-    InheritableThreadLocal<HashMap<String, String>> {
-
-  /**
-   * Child threads should get a copy of the parent's hashmap.
-   */
-  @Override
-  protected HashMap<String, String> childValue(
-      HashMap<String, String> parentValue) {
-    if (parentValue == null) {
-      return null;
-    } else {
-      HashMap<String, String> hm = new HashMap<String, String>(parentValue);
-      return hm;
-    }
-  }
-
-}
Index: source-bundle/org/slf4j/impl/LogbackMDCAdapter.java
===================================================================
RCS file: source-bundle/org/slf4j/impl/LogbackMDCAdapter.java
diff -N source-bundle/org/slf4j/impl/LogbackMDCAdapter.java
--- source-bundle/org/slf4j/impl/LogbackMDCAdapter.java	21 Jan 2010 13:34:42 -0000	1.1.2.1
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,175 +0,0 @@
-/**
- * Logback: the reliable, generic, fast and flexible logging framework.
- * Copyright (C) 1999-2009, QOS.ch. All rights reserved.
- *
- * This program and the accompanying materials are dual-licensed under
- * either the terms of the Eclipse Public License v1.0 as published by
- * the Eclipse Foundation
- *
- *   or (per the licensee's choosing)
- *
- * under the terms of the GNU Lesser General Public License version 2.1
- * as published by the Free Software Foundation.
- */
-package org.slf4j.impl;
-
-import java.util.HashMap;
-import java.util.Map;
-import java.util.Set;
-
-import org.slf4j.spi.MDCAdapter;
-
-/**
- * A <em>Mapped Diagnostic Context</em>, or MDC in short, is an instrument
- * for distinguishing interleaved log output from different sources. Log output
- * is typically interleaved when a server handles multiple clients
- * near-simultaneously. <p> <b><em>The MDC is managed on a per thread basis</em></b>.
- * A child thread automatically inherits a <em>copy</em> of the mapped
- * diagnostic context of its parent. <p>
- * 
- * For more information about MDC, please refer to the online manual at
- * http://logback.qos.ch/manual/mdc.html
- * 
- * @author Ceki G&uuml;lc&uuml;
- */
-public class LogbackMDCAdapter implements MDCAdapter {
-
-  // final CopyOnInheritThreadLocal copyOnInheritThreadLocal = new
-  // CopyOnInheritThreadLocal();
-
-  final CopyOnInheritThreadLocal copyOnInheritThreadLocal = new CopyOnInheritThreadLocal();
-
-  LogbackMDCAdapter() {
-  }
-
-  /**
-   * Put a context value (the <code>val</code> parameter) as identified with
-   * the <code>key</code> parameter into the current thread's context map.
-   * Note that contrary to log4j, the <code>val</code> parameter can be null.
-   * 
-   * <p> If the current thread does not have a context map it is created as a
-   * side effect of this call.
-   * 
-   * <p> Each time a value is added, a new instance of the map is created. This
-   * is to be certain that the serialization process will operate on the updated
-   * map and not send a reference to the old map, thus not allowing the remote
-   * logback component to see the latest changes.
-   * 
-   * @throws IllegalArgumentException
-   *                 in case the "key" parameter is null
-   */
-  public void put(String key, String val) throws IllegalArgumentException {
-    if (key == null) {
-      throw new IllegalArgumentException("key cannot be null");
-    }
-
-    HashMap<String, String> oldMap = copyOnInheritThreadLocal.get();
-
-    HashMap<String, String> newMap = new HashMap<String, String>();
-    if (oldMap != null) {
-      newMap.putAll(oldMap);
-    }
-    // the newMap replaces the old one for serialisation's sake
-    copyOnInheritThreadLocal.set(newMap);
-    newMap.put(key, val);
-  }
-
-  /**
-   * Get the context identified by the <code>key</code> parameter.
-   * 
-   * <p> This method has no side effects.
-   */
-  public String get(String key) {
-    HashMap<String, String> hashMap = copyOnInheritThreadLocal.get();
-
-    if ((hashMap != null) && (key != null)) {
-      return hashMap.get(key);
-    } else {
-      return null;
-    }
-  }
-
-  /**
-   * Remove the the context identified by the <code>key</code> parameter.
-   * 
-   * <p> Each time a value is removed, a new instance of the map is created.
-   * This is to be certain that the serialization process will operate on the
-   * updated map and not send a reference to the old map, thus not allowing the
-   * remote logback component to see the latest changes.
-   */
-  public void remove(String key) {
-    HashMap<String, String> oldMap = copyOnInheritThreadLocal.get();
-
-    HashMap<String, String> newMap = new HashMap<String, String>();
-    if (oldMap != null) {
-      newMap.putAll(oldMap);
-    }
-    // the newMap replaces the old one for serialisation's sake
-    copyOnInheritThreadLocal.set(newMap);
-    newMap.remove(key);
-  }
-
-  /**
-   * Clear all entries in the MDC.
-   */
-  public void clear() {
-    HashMap<String, String> hashMap = copyOnInheritThreadLocal.get();
-
-    if (hashMap != null) {
-      hashMap.clear();
-      copyOnInheritThreadLocal.remove();
-    }
-  }
-
-  /**
-   * Get the current thread's MDC as a map. This method is intended to be used
-   * internally.
-   */
-  public Map<String, String> getPropertyMap() {
-    return copyOnInheritThreadLocal.get();
-  }
-
-  /**
-   * Return a copy of the current thread's context map. Returned value may be
-   * null.
-   */
-  public Map getCopyOfContextMap() {
-    HashMap<String, String> hashMap = copyOnInheritThreadLocal.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.
-   */
-  public Set<String> getKeys() {
-    HashMap<String, String> hashMap = copyOnInheritThreadLocal.get();
-
-    if (hashMap != null) {
-      return hashMap.keySet();
-    } else {
-      return null;
-    }
-  }
-
-  @SuppressWarnings("unchecked")
-  public void setContextMap(Map contextMap) {
-    HashMap<String, String> oldMap = copyOnInheritThreadLocal.get();
-
-    HashMap<String, String> newMap = new HashMap<String, String>();
-    newMap.putAll(contextMap);
-
-    // the newMap replaces the old one for serialisation's sake
-    copyOnInheritThreadLocal.set(newMap);
-
-    // hints for the garbage collector
-    if (oldMap != null) {
-      oldMap.clear();
-      oldMap = null;
-    }
-  }
-}
Index: source-bundle/org/slf4j/impl/StaticMDCBinder.java
===================================================================
RCS file: /cvsroot/tools/org.eclipse.orbit/ch.qos.logback.slf4j/source-bundle/org/slf4j/impl/Attic/StaticMDCBinder.java,v
retrieving revision 1.1.2.1
diff -u -r1.1.2.1 StaticMDCBinder.java
--- source-bundle/org/slf4j/impl/StaticMDCBinder.java	21 Jan 2010 13:34:42 -0000	1.1.2.1
+++ source-bundle/org/slf4j/impl/StaticMDCBinder.java	4 Feb 2010 09:38:32 -0000
@@ -15,6 +15,8 @@
 
 import org.slf4j.spi.MDCAdapter;
 
+import ch.qos.logback.classic.spi.LogbackMDCAdapter;
+
 
 /**
  * This implementation is bound to {@link LogbackMDCAdapter}.
