Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorIgor Fedorenko2014-09-15 07:15:03 -0400
committerIgor Fedorenko2014-09-15 07:15:03 -0400
commitfc661a37d6a4f8df5d108931c29586b91b2496a0 (patch)
treeb15ba825dcf4181e1610f387165154e401e3df45 /org.eclipse.m2e.logback.appender
parentba429ed041ea1cd5ebb807327bb8e8d40d9358a1 (diff)
downloadm2e-core-fc661a37d6a4f8df5d108931c29586b91b2496a0.tar.gz
m2e-core-fc661a37d6a4f8df5d108931c29586b91b2496a0.tar.xz
m2e-core-fc661a37d6a4f8df5d108931c29586b91b2496a0.zip
444039 extract throwable using logback API
Change-Id: Ia469ac07b241a1286e6afdd51f80d2b810c89615 Signed-off-by: Igor Fedorenko <igor@ifedorenko.com>
Diffstat (limited to 'org.eclipse.m2e.logback.appender')
-rw-r--r--org.eclipse.m2e.logback.appender/src/main/java/org/eclipse/m2e/logback/appender/EclipseLogAppender.java5
1 files changed, 5 insertions, 0 deletions
diff --git a/org.eclipse.m2e.logback.appender/src/main/java/org/eclipse/m2e/logback/appender/EclipseLogAppender.java b/org.eclipse.m2e.logback.appender/src/main/java/org/eclipse/m2e/logback/appender/EclipseLogAppender.java
index 61ed0980..66c214b3 100644
--- a/org.eclipse.m2e.logback.appender/src/main/java/org/eclipse/m2e/logback/appender/EclipseLogAppender.java
+++ b/org.eclipse.m2e.logback.appender/src/main/java/org/eclipse/m2e/logback/appender/EclipseLogAppender.java
@@ -15,6 +15,7 @@ import org.osgi.framework.Bundle;
import ch.qos.logback.classic.Level;
import ch.qos.logback.classic.spi.ILoggingEvent;
+import ch.qos.logback.classic.spi.ThrowableProxy;
import ch.qos.logback.core.UnsynchronizedAppenderBase;
import org.eclipse.core.runtime.ILog;
@@ -58,6 +59,10 @@ public class EclipseLogAppender extends UnsynchronizedAppenderBase<ILoggingEvent
}
private Throwable getThrowable(ILoggingEvent logEvent) {
+ if(logEvent.getThrowableProxy() instanceof ThrowableProxy) {
+ return ((ThrowableProxy) logEvent.getThrowableProxy()).getThrowable();
+ }
+
Object[] args = logEvent.getArgumentArray();
if(args == null || args.length == 0) {
return null;

Back to the top