[LOGBack-dev] svn commit: r556 - logback/trunk/logback-classic/src/main/java/ch/qos/logback/classic/pattern
noreply.seb at qos.ch
noreply.seb at qos.ch
Mon Sep 11 16:48:25 CEST 2006
Author: seb
Date: Mon Sep 11 16:48:25 2006
New Revision: 556
Modified:
logback/trunk/logback-classic/src/main/java/ch/qos/logback/classic/pattern/MDCConverter.java
Log:
better testing before returning the value
Modified: logback/trunk/logback-classic/src/main/java/ch/qos/logback/classic/pattern/MDCConverter.java
==============================================================================
--- logback/trunk/logback-classic/src/main/java/ch/qos/logback/classic/pattern/MDCConverter.java (original)
+++ logback/trunk/logback-classic/src/main/java/ch/qos/logback/classic/pattern/MDCConverter.java Mon Sep 11 16:48:25 2006
@@ -28,7 +28,11 @@
LoggingEvent loggingEvent = (LoggingEvent) event;
Map<String, String> mdcPropertyMap = loggingEvent.getMDCPropertyMap();
if (mdcPropertyMap != null) {
- return loggingEvent.getMDCPropertyMap().get(key);
+ String value = loggingEvent.getMDCPropertyMap().get(key);
+ if (value != null) {
+ return value;
+ }
+ return "";
} else {
return "";
}
More information about the logback-dev
mailing list