Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorvladt2011-02-11 14:11:38 -0500
committervladt2011-02-11 14:11:38 -0500
commit0137f03b92ce37676c4295db2332b784c222d1cb (patch)
tree5f5db743da3f72f9635a372722ec093044933836 /org.eclipse.m2e.logback.appender/src
parentd39a99400566d870349cfa502bacfbfc56a7f32f (diff)
downloadm2e-core-0137f03b92ce37676c4295db2332b784c222d1cb.tar.gz
m2e-core-0137f03b92ce37676c4295db2332b784c222d1cb.tar.xz
m2e-core-0137f03b92ce37676c4295db2332b784c222d1cb.zip
335872: Added debug level to the MavenConsole
Diffstat (limited to 'org.eclipse.m2e.logback.appender/src')
-rw-r--r--org.eclipse.m2e.logback.appender/src/main/java/org/eclipse/m2e/logback/appender/MavenConsoleAppender.java14
1 files changed, 10 insertions, 4 deletions
diff --git a/org.eclipse.m2e.logback.appender/src/main/java/org/eclipse/m2e/logback/appender/MavenConsoleAppender.java b/org.eclipse.m2e.logback.appender/src/main/java/org/eclipse/m2e/logback/appender/MavenConsoleAppender.java
index 6363074f..5619e859 100644
--- a/org.eclipse.m2e.logback.appender/src/main/java/org/eclipse/m2e/logback/appender/MavenConsoleAppender.java
+++ b/org.eclipse.m2e.logback.appender/src/main/java/org/eclipse/m2e/logback/appender/MavenConsoleAppender.java
@@ -39,10 +39,16 @@ public class MavenConsoleAppender extends UnsynchronizedAppenderBase<ILoggingEve
}
MavenConsole mavenConsole = M2EUIPluginActivator.getDefault().getMavenConsole();
- if(logEvent.getLevel().levelInt == Level.ERROR_INT) {
- mavenConsole.logError(logEvent.toString());
- } else {
- mavenConsole.logMessage(logEvent.toString());
+ switch(logEvent.getLevel().levelInt) {
+ case Level.DEBUG_INT:
+ mavenConsole.debug(logEvent.toString());
+ return;
+ case Level.ERROR_INT:
+ mavenConsole.error(logEvent.toString());
+ return;
+ case Level.WARN_INT:
+ mavenConsole.info(logEvent.toString());
+ return;
}
}

Back to the top