Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGlyn Normington2010-09-27 11:09:40 -0400
committerGlyn Normington2010-09-27 11:09:40 -0400
commitfe60efa0c9a5d5ba7776757236b4a0a013321e1f (patch)
treef347235da6312819fe487f1d6eb1583ef87f2eb9
parentb3625891a2b11615a58ef66927b31be22304bc69 (diff)
downloadorg.eclipse.virgo.medic-fe60efa0c9a5d5ba7776757236b4a0a013321e1f.tar.gz
org.eclipse.virgo.medic-fe60efa0c9a5d5ba7776757236b4a0a013321e1f.tar.xz
org.eclipse.virgo.medic-fe60efa0c9a5d5ba7776757236b4a0a013321e1f.zip
bug 326030: improve medic diagnostics for appender type class loading errors
-rw-r--r--org.eclipse.virgo.medic.core/src/main/java/org/eclipse/virgo/medic/log/impl/logback/JoranLoggerContextConfigurer.java8
1 files changed, 6 insertions, 2 deletions
diff --git a/org.eclipse.virgo.medic.core/src/main/java/org/eclipse/virgo/medic/log/impl/logback/JoranLoggerContextConfigurer.java b/org.eclipse.virgo.medic.core/src/main/java/org/eclipse/virgo/medic/log/impl/logback/JoranLoggerContextConfigurer.java
index 3eb52c9..2863efc 100644
--- a/org.eclipse.virgo.medic.core/src/main/java/org/eclipse/virgo/medic/log/impl/logback/JoranLoggerContextConfigurer.java
+++ b/org.eclipse.virgo.medic.core/src/main/java/org/eclipse/virgo/medic/log/impl/logback/JoranLoggerContextConfigurer.java
@@ -23,7 +23,6 @@ import ch.qos.logback.classic.joran.JoranConfigurator;
import ch.qos.logback.core.joran.spi.JoranException;
import ch.qos.logback.core.status.Status;
-
public final class JoranLoggerContextConfigurer implements LoggerContextConfigurer {
public void applyConfiguration(LoggingConfiguration configuration, LoggerContext loggerContext) throws LoggerContextConfigurationFailedException {
@@ -36,7 +35,12 @@ public final class JoranLoggerContextConfigurer implements LoggerContextConfigur
List<String> failureMessages = new ArrayList<String>();
for (Status status : statusList) {
if (Status.INFO != status.getLevel()) {
- failureMessages.add(status.getMessage());
+ Throwable cause = null;
+ Throwable t = status.getThrowable();
+ if (t != null) {
+ cause = t.getCause();
+ }
+ failureMessages.add(status.getMessage() + (cause != null ? " Caused by " + cause + "." : ""));
}
}
reportFailureIfNecessary(failureMessages);

Back to the top