Title: [waffle-scm] [376] trunk/core/src/main/java/org/codehaus/waffle/monitor/CommonsLoggingMonitor.java: Inlined.
Revision
376
Author
mauro
Date
2007-11-15 03:02:53 -0600 (Thu, 15 Nov 2007)

Log Message

Inlined.

Modified Paths


Diff

Modified: trunk/core/src/main/java/org/codehaus/waffle/monitor/CommonsLoggingMonitor.java (375 => 376)

--- trunk/core/src/main/java/org/codehaus/waffle/monitor/CommonsLoggingMonitor.java	2007-11-15 08:49:33 UTC (rev 375)
+++ trunk/core/src/main/java/org/codehaus/waffle/monitor/CommonsLoggingMonitor.java	2007-11-15 09:02:53 UTC (rev 376)
@@ -10,8 +10,6 @@
  *****************************************************************************/
 package org.codehaus.waffle.monitor;
 
-import java.text.MessageFormat;
-
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
 
@@ -22,7 +20,7 @@
  */
 public class CommonsLoggingMonitor extends AbstractWritingMonitor {
 
-    private static final String WAFFLE_TEMPLATE = "[WAFFLE]: {0}";
+    private static final String WAFFLE = "[WAFFLE]: {0}";
     private final Log log;
 
     /**
@@ -56,22 +54,22 @@
         switch (level) {
             case ERROR:
                 if (log.isErrorEnabled()) {
-                    log.error(format(message));
+                    log.error(format(WAFFLE, message));
                 }
                 break;
             case INFO:
                 if (log.isInfoEnabled()) {
-                    log.info(format(message));
+                    log.info(format(WAFFLE, message));
                 }
                 break;
             case WARN:
                 if (log.isWarnEnabled()) {
-                    log.warn(format(message));
+                    log.warn(format(WAFFLE, message));
                 }
                 break;
             case DEBUG:
                 if (log.isDebugEnabled()) {
-                    log.debug(format(message));
+                    log.debug(format(WAFFLE, message));
                 }
                 break;
         }
@@ -80,12 +78,8 @@
     @Override
     protected void trace(Throwable exception) {
         if (log.isErrorEnabled()) {
-            log.error(format(exception.getMessage()), exception);
+            log.error(format(WAFFLE, exception.getMessage()), exception);
         }
     }
 
-    private String format(String message) {
-        return MessageFormat.format(WAFFLE_TEMPLATE, message);
-    }
-
 }


To unsubscribe from this list please visit:

http://xircles.codehaus.org/manage_email

Reply via email to