logging-log4j-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From carn...@apache.org
Subject svn commit: r365295 - in /logging/log4j/trunk/src/java/org/apache/log4j: MDC.java spi/LoggingEvent.java
Date Mon, 02 Jan 2006 05:22:06 GMT
Author: carnold
Date: Sun Jan  1 21:22:03 2006
New Revision: 365295

URL: http://svn.apache.org/viewcvs?rev=365295&view=rev
Log:
Bug 35452: Change return value of MDC.get back to Object

Modified:
    logging/log4j/trunk/src/java/org/apache/log4j/MDC.java
    logging/log4j/trunk/src/java/org/apache/log4j/spi/LoggingEvent.java

Modified: logging/log4j/trunk/src/java/org/apache/log4j/MDC.java
URL: http://svn.apache.org/viewcvs/logging/log4j/trunk/src/java/org/apache/log4j/MDC.java?rev=365295&r1=365294&r2=365295&view=diff
==============================================================================
--- logging/log4j/trunk/src/java/org/apache/log4j/MDC.java (original)
+++ logging/log4j/trunk/src/java/org/apache/log4j/MDC.java Sun Jan  1 21:22:03 2006
@@ -84,7 +84,7 @@
    *
    *  <p>This method has no side effects.
    * */
-  public static String get(String key) {
+  public static Object get(String key) {
     Hashtable ht = (Hashtable) tlm.get();
 
     if ((ht != null) && (key != null)) {

Modified: logging/log4j/trunk/src/java/org/apache/log4j/spi/LoggingEvent.java
URL: http://svn.apache.org/viewcvs/logging/log4j/trunk/src/java/org/apache/log4j/spi/LoggingEvent.java?rev=365295&r1=365294&r2=365295&view=diff
==============================================================================
--- logging/log4j/trunk/src/java/org/apache/log4j/spi/LoggingEvent.java (original)
+++ logging/log4j/trunk/src/java/org/apache/log4j/spi/LoggingEvent.java Sun Jan  1 21:22:03
2006
@@ -578,10 +578,10 @@
     }
 
     // if the key was not found in this even't properties, try the MDC
-    value = MDC.get(key);
+    Object mdcvalue = MDC.get(key);
 
-    if (value != null) {
-      return value;
+    if (mdcvalue != null) {
+      return mdcvalue.toString();
     }
 
     // if still not found try, the properties in the logger repository



---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-dev-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-dev-help@logging.apache.org


Mime
View raw message