Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorvladt2011-02-11 22:37:43 +0000
committervladt2011-02-11 22:38:05 +0000
commitf73902413ad2711d9a21bcaa9766fe50d29b6d29 (patch)
tree913d892c7d51d18d2143ebdc535291e97951f6f0
parent5d9b0a01b47f08368982f1fffbad818bc58334dc (diff)
downloadm2e-core-f73902413ad2711d9a21bcaa9766fe50d29b6d29.tar.gz
m2e-core-f73902413ad2711d9a21bcaa9766fe50d29b6d29.tar.xz
m2e-core-f73902413ad2711d9a21bcaa9766fe50d29b6d29.zip
335872: Fixed INFO level in MavenConsoleAppender and some cleanup in EclipseLogger
-rw-r--r--org.eclipse.m2e.core/src/org/eclipse/m2e/core/internal/Messages.java20
-rw-r--r--org.eclipse.m2e.core/src/org/eclipse/m2e/core/internal/embedder/EclipseLogger.java22
-rw-r--r--org.eclipse.m2e.core/src/org/eclipse/m2e/core/internal/messages.properties10
-rw-r--r--org.eclipse.m2e.logback.appender/src/main/java/org/eclipse/m2e/logback/appender/MavenConsoleAppender.java2
4 files changed, 12 insertions, 42 deletions
diff --git a/org.eclipse.m2e.core/src/org/eclipse/m2e/core/internal/Messages.java b/org.eclipse.m2e.core/src/org/eclipse/m2e/core/internal/Messages.java
index 07756079..0a1100b2 100644
--- a/org.eclipse.m2e.core/src/org/eclipse/m2e/core/internal/Messages.java
+++ b/org.eclipse.m2e.core/src/org/eclipse/m2e/core/internal/Messages.java
@@ -60,28 +60,8 @@ public class Messages extends NLS {
public static String AsyncFetcher_task_fetching2;
- public static String EclipseLogger_debug1;
-
- public static String EclipseLogger_debug2;
-
- public static String EclipseLogger_error1;
-
- public static String EclipseLogger_error2;
-
- public static String EclipseLogger_fatal1;
-
- public static String EclipseLogger_fatal2;
-
- public static String EclipseLogger_info1;
-
- public static String EclipseLogger_info2;
-
public static String EclipseLogger_name;
- public static String EclipseLogger_warn1;
-
- public static String EclipseLogger_warn2;
-
public static String IndexUpdaterJob_title;
public static String LifecycleConfigurationPluginExecutionNotCovered;
diff --git a/org.eclipse.m2e.core/src/org/eclipse/m2e/core/internal/embedder/EclipseLogger.java b/org.eclipse.m2e.core/src/org/eclipse/m2e/core/internal/embedder/EclipseLogger.java
index 2b5d5afc..72d6197f 100644
--- a/org.eclipse.m2e.core/src/org/eclipse/m2e/core/internal/embedder/EclipseLogger.java
+++ b/org.eclipse.m2e.core/src/org/eclipse/m2e/core/internal/embedder/EclipseLogger.java
@@ -13,8 +13,6 @@ package org.eclipse.m2e.core.internal.embedder;
import org.slf4j.LoggerFactory;
-import org.eclipse.osgi.util.NLS;
-
import org.codehaus.plexus.logging.Logger;
import org.eclipse.m2e.core.embedder.IMavenConfiguration;
@@ -31,61 +29,61 @@ class EclipseLogger implements Logger {
public void debug( String msg ) {
if (isDebugEnabled()) {
- log.debug(NLS.bind(Messages.EclipseLogger_debug1, msg));
+ log.debug(msg);
}
}
public void debug( String msg, Throwable t) {
if (isDebugEnabled()) {
- log.debug(NLS.bind(Messages.EclipseLogger_debug2, msg, t.getMessage()));
+ log.debug(msg + " " + t.getMessage(), t);
}
}
public void info( String msg ) {
if (isInfoEnabled()) {
- log.info(NLS.bind(Messages.EclipseLogger_info1, msg));
+ log.info(msg);
}
}
public void info( String msg, Throwable t ) {
if (isInfoEnabled()) {
- log.info(NLS.bind(Messages.EclipseLogger_info2, msg, t.getMessage()));
+ log.info(msg + " " + t.getMessage(), t);
}
}
public void warn( String msg ) {
if (isWarnEnabled()) {
- log.warn(NLS.bind(Messages.EclipseLogger_warn1, msg));
+ log.warn(msg);
}
}
public void warn( String msg, Throwable t ) {
if (isWarnEnabled()) {
- log.warn(NLS.bind(Messages.EclipseLogger_warn2, msg, t.getMessage()));
+ log.warn(msg + " " + t.getMessage(), t);
}
}
public void fatalError( String msg ) {
if (isFatalErrorEnabled()) {
- log.error(NLS.bind(Messages.EclipseLogger_fatal1, msg));
+ log.error(msg);
}
}
public void fatalError( String msg, Throwable t ) {
if (isFatalErrorEnabled()) {
- log.error(NLS.bind(Messages.EclipseLogger_fatal2, msg, t.getMessage()));
+ log.error(msg + " " + t.getMessage(), t);
}
}
public void error( String msg ) {
if (isErrorEnabled()) {
- log.error(NLS.bind(Messages.EclipseLogger_error1, msg));
+ log.error(msg);
}
}
public void error( String msg, Throwable t ) {
if (isErrorEnabled()) {
- log.error(NLS.bind(Messages.EclipseLogger_error2, msg, t.getMessage()));
+ log.error(msg + " " + t.getMessage(), t);
}
}
diff --git a/org.eclipse.m2e.core/src/org/eclipse/m2e/core/internal/messages.properties b/org.eclipse.m2e.core/src/org/eclipse/m2e/core/internal/messages.properties
index 5f2eef45..ab985489 100644
--- a/org.eclipse.m2e.core/src/org/eclipse/m2e/core/internal/messages.properties
+++ b/org.eclipse.m2e.core/src/org/eclipse/m2e/core/internal/messages.properties
@@ -17,17 +17,7 @@ AsyncFetcher_error_cancelled=transfer has been cancelled by user
AsyncFetcher_error_server=Server returned status code {0}: {1}
AsyncFetcher_task_fetching=Fetching {0}
AsyncFetcher_task_fetching2=Fetching {0} ({1}%)
-EclipseLogger_debug1=[DEBUG] {0}
-EclipseLogger_debug2=[DEBUG] {0} {1}
-EclipseLogger_error1=[ERROR] {0}
-EclipseLogger_error2=[ERROR] {0} {1}
-EclipseLogger_fatal1=[FATAL ERROR] {0}
-EclipseLogger_fatal2=[FATAL ERROR] {0} {1}
-EclipseLogger_info1=[INFO] {0}
-EclipseLogger_info2=[INFO] {0} {1}
EclipseLogger_name=m2e console logger
-EclipseLogger_warn1=[WARN] {0}
-EclipseLogger_warn2=[WARN] {0} {1}
IndexUpdaterJob_title=Updating indexes
LifecycleConfigurationPluginExecutionNotCovered=Plugin execution not covered by lifecycle configuration: {0}
LifecycleConfigurationPluginExecutionErrorMessage=Plugin execution marked as error in lifecycle configuration: {0}
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 5619e859..3b3034a4 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
@@ -47,6 +47,8 @@ public class MavenConsoleAppender extends UnsynchronizedAppenderBase<ILoggingEve
mavenConsole.error(logEvent.toString());
return;
case Level.WARN_INT:
+ case Level.INFO_INT:
+ default:
mavenConsole.info(logEvent.toString());
return;
}

Back to the top