Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristopher Frost2010-08-04 11:55:34 -0400
committerChristopher Frost2010-08-04 11:55:34 -0400
commit66e6456ebc2ae1dffa887bce606bbfcc8c46aba1 (patch)
tree59310abd90e855c3750bbd42d68dce800420f5f6 /org.eclipse.virgo.medic.core
parent1f37aea99075ba3b33091f4152d3027ed1ec7891 (diff)
downloadorg.eclipse.virgo.medic-66e6456ebc2ae1dffa887bce606bbfcc8c46aba1.tar.gz
org.eclipse.virgo.medic-66e6456ebc2ae1dffa887bce606bbfcc8c46aba1.tar.xz
org.eclipse.virgo.medic-66e6456ebc2ae1dffa887bce606bbfcc8c46aba1.zip
[DMS-2794] Upgrading the version of Logback and SLF4J being used
Diffstat (limited to 'org.eclipse.virgo.medic.core')
-rw-r--r--org.eclipse.virgo.medic.core/.classpath6
-rw-r--r--org.eclipse.virgo.medic.core/src/main/java/org/eclipse/virgo/medic/eventlog/impl/logback/LogBackEventLogger.java2
-rw-r--r--org.eclipse.virgo.medic.core/src/main/java/org/eclipse/virgo/medic/log/logback/ReroutingAwareConsoleAppender.java14
-rw-r--r--org.eclipse.virgo.medic.core/template.mf6
4 files changed, 17 insertions, 11 deletions
diff --git a/org.eclipse.virgo.medic.core/.classpath b/org.eclipse.virgo.medic.core/.classpath
index 233fb90..78e0d70 100644
--- a/org.eclipse.virgo.medic.core/.classpath
+++ b/org.eclipse.virgo.medic.core/.classpath
@@ -28,9 +28,9 @@
<classpathentry kind="var" path="MEDIC_IVY_CACHE/org.apache.felix/org.apache.felix.configadmin/1.2.4/org.apache.felix.configadmin-1.2.4.jar" sourcepath="/MEDIC_IVY_CACHE/org.apache.felix/org.apache.felix.configadmin/1.2.4/org.apache.felix.configadmin-sources-1.2.4.jar"/>
<classpathentry kind="var" path="MEDIC_IVY_CACHE/org.eclipse.virgo.teststubs/org.eclipse.virgo.teststubs.osgi/2.1.0.D-20100727175207/org.eclipse.virgo.teststubs.osgi-2.1.0.D-20100727175207.jar" sourcepath="/MEDIC_IVY_CACHE/org.eclipse.virgo.teststubs/org.eclipse.virgo.teststubs.osgi/2.1.0.D-20100727175207/org.eclipse.virgo.teststubs.osgi-sources-2.1.0.D-20100727175207.jar"/>
<classpathentry kind="var" path="MEDIC_IVY_CACHE/org.aspectj/com.springsource.org.aspectj.runtime/1.6.6.RELEASE/com.springsource.org.aspectj.runtime-1.6.6.RELEASE.jar" sourcepath="/MEDIC_IVY_CACHE/org.aspectj/com.springsource.org.aspectj.runtime/1.6.6.RELEASE/com.springsource.org.aspectj.runtime-sources-1.6.6.RELEASE.jar"/>
- <classpathentry kind="var" path="MEDIC_IVY_CACHE/org.slf4j/com.springsource.slf4j.api/1.5.10/com.springsource.slf4j.api-1.5.10.jar" sourcepath="/MEDIC_IVY_CACHE/org.slf4j/com.springsource.slf4j.api/1.5.10/com.springsource.slf4j.api-sources-1.5.10.jar"/>
- <classpathentry kind="var" path="MEDIC_IVY_CACHE/ch.qos.logback/com.springsource.ch.qos.logback.classic/0.9.18/com.springsource.ch.qos.logback.classic-0.9.18.jar" sourcepath="/MEDIC_IVY_CACHE/ch.qos.logback/com.springsource.ch.qos.logback.classic/0.9.18/com.springsource.ch.qos.logback.classic-sources-0.9.18.jar"/>
- <classpathentry kind="var" path="MEDIC_IVY_CACHE/ch.qos.logback/com.springsource.ch.qos.logback.core/0.9.18/com.springsource.ch.qos.logback.core-0.9.18.jar" sourcepath="/MEDIC_IVY_CACHE/ch.qos.logback/com.springsource.ch.qos.logback.core/0.9.18/com.springsource.ch.qos.logback.core-sources-0.9.18.jar"/>
+ <classpathentry kind="var" path="MEDIC_IVY_CACHE/org.slf4j/com.springsource.slf4j.api/1.6.1/com.springsource.slf4j.api-1.6.1.jar" sourcepath="/MEDIC_IVY_CACHE/org.slf4j/com.springsource.slf4j.api/1.6.1/com.springsource.slf4j.api-sources-1.6.1.jar"/>
+ <classpathentry kind="var" path="MEDIC_IVY_CACHE/ch.qos.logback/com.springsource.ch.qos.logback.classic/0.9.24/com.springsource.ch.qos.logback.classic-0.9.24.jar" sourcepath="/MEDIC_IVY_CACHE/ch.qos.logback/com.springsource.ch.qos.logback.classic/0.9.24/com.springsource.ch.qos.logback.classic-sources-0.9.24.jar"/>
+ <classpathentry kind="var" path="MEDIC_IVY_CACHE/ch.qos.logback/com.springsource.ch.qos.logback.core/0.9.24/com.springsource.ch.qos.logback.core-0.9.24.jar" sourcepath="/MEDIC_IVY_CACHE/ch.qos.logback/com.springsource.ch.qos.logback.core/0.9.24/com.springsource.ch.qos.logback.core-sources-0.9.24.jar"/>
<classpathentry kind="var" path="MEDIC_IVY_CACHE/org.eclipse.virgo.util/org.eclipse.virgo.util.osgi/2.1.0.D-20100727175631/org.eclipse.virgo.util.osgi-2.1.0.D-20100727175631.jar" sourcepath="/MEDIC_IVY_CACHE/org.eclipse.virgo.util/org.eclipse.virgo.util.osgi/2.1.0.D-20100727175631/org.eclipse.virgo.util.osgi-sources-2.1.0.D-20100727175631.jar"/>
<classpathentry kind="con" path="org.eclipse.ajdt.core.ASPECTJRT_CONTAINER"/>
<classpathentry combineaccessrules="false" kind="src" path="/org.eclipse.virgo.medic.weaving"/>
diff --git a/org.eclipse.virgo.medic.core/src/main/java/org/eclipse/virgo/medic/eventlog/impl/logback/LogBackEventLogger.java b/org.eclipse.virgo.medic.core/src/main/java/org/eclipse/virgo/medic/eventlog/impl/logback/LogBackEventLogger.java
index 85008c6..074e55b 100644
--- a/org.eclipse.virgo.medic.core/src/main/java/org/eclipse/virgo/medic/eventlog/impl/logback/LogBackEventLogger.java
+++ b/org.eclipse.virgo.medic.core/src/main/java/org/eclipse/virgo/medic/eventlog/impl/logback/LogBackEventLogger.java
@@ -83,7 +83,7 @@ class LogBackEventLogger implements EventLogger {
private void logMessage(Logger logger, String message, Level level, String eventCode, Throwable throwable, Object... inserts) {
try {
MDC.put(MDC_KEY_MEDIC_EVENT_CODE, eventCode);
- String formattedMessage = MessageFormatter.arrayFormat(message, (Object[]) inserts);
+ String formattedMessage = MessageFormatter.arrayFormat(message, (Object[]) inserts).getMessage();
switch (level) {
case ERROR:
logger.error(formattedMessage, throwable);
diff --git a/org.eclipse.virgo.medic.core/src/main/java/org/eclipse/virgo/medic/log/logback/ReroutingAwareConsoleAppender.java b/org.eclipse.virgo.medic.core/src/main/java/org/eclipse/virgo/medic/log/logback/ReroutingAwareConsoleAppender.java
index 0463c47..21ccd14 100644
--- a/org.eclipse.virgo.medic.core/src/main/java/org/eclipse/virgo/medic/log/logback/ReroutingAwareConsoleAppender.java
+++ b/org.eclipse.virgo.medic.core/src/main/java/org/eclipse/virgo/medic/log/logback/ReroutingAwareConsoleAppender.java
@@ -12,7 +12,6 @@
package org.eclipse.virgo.medic.log.logback;
import java.io.OutputStream;
-import java.io.OutputStreamWriter;
import org.eclipse.virgo.medic.log.impl.LoggingPrintStreamWrapper;
@@ -32,11 +31,16 @@ import ch.qos.logback.core.ConsoleAppender;
*/
public class ReroutingAwareConsoleAppender<E> extends ConsoleAppender<E> {
- protected OutputStreamWriter createWriter(OutputStream os) {
- if (os instanceof LoggingPrintStreamWrapper) {
- return super.createWriter(((LoggingPrintStreamWrapper)os).getOriginalPrintStream());
+ /**
+ * This is responsible for ensuring the Appender is using the right output stream as it may have been wrapped.
+ */
+ @Override
+ public void setOutputStream(OutputStream outputStream) {
+ if (outputStream instanceof LoggingPrintStreamWrapper) {
+ super.setOutputStream(((LoggingPrintStreamWrapper)outputStream).getOriginalPrintStream());
} else {
- return super.createWriter(os);
+ super.setOutputStream(outputStream);
}
}
+
}
diff --git a/org.eclipse.virgo.medic.core/template.mf b/org.eclipse.virgo.medic.core/template.mf
index c3f35c3..65e93a6 100644
--- a/org.eclipse.virgo.medic.core/template.mf
+++ b/org.eclipse.virgo.medic.core/template.mf
@@ -22,9 +22,11 @@ Import-Template:
org.slf4j.*;version="${org.slf4j:[=.=.=, +1.0.0)}",
org.xml.sax.*;version="0"
Excluded-Imports:
- org.codehaus.janino.*
+ org.codehaus.janino.*,
+ org.codehaus.groovy.*,
+ groovy.lang
Export-Template:
- org.slf4j.impl;version="1.5.10",
+ org.slf4j.impl;version="1.6.1",
ch.qos.logback.*;version="${ch.qos.logback}"
Excluded-Exports:
org.eclipse.virgo.medic.*

Back to the top