logging-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ggreg...@apache.org
Subject svn commit: r1397210 - /logging/log4j/log4j2/trunk/api/src/main/java/org/apache/logging/log4j/spi/AbstractLogger.java
Date Thu, 11 Oct 2012 18:08:27 GMT
Author: ggregory
Date: Thu Oct 11 18:08:27 2012
New Revision: 1397210

URL: http://svn.apache.org/viewvc?rev=1397210&view=rev
Log:
Refactor multiple occurrences of a magic string into the new private constant CATCHING.

Modified:
    logging/log4j/log4j2/trunk/api/src/main/java/org/apache/logging/log4j/spi/AbstractLogger.java

Modified: logging/log4j/log4j2/trunk/api/src/main/java/org/apache/logging/log4j/spi/AbstractLogger.java
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/api/src/main/java/org/apache/logging/log4j/spi/AbstractLogger.java?rev=1397210&r1=1397209&r2=1397210&view=diff
==============================================================================
--- logging/log4j/log4j2/trunk/api/src/main/java/org/apache/logging/log4j/spi/AbstractLogger.java
(original)
+++ logging/log4j/log4j2/trunk/api/src/main/java/org/apache/logging/log4j/spi/AbstractLogger.java
Thu Oct 11 18:08:27 2012
@@ -31,6 +31,7 @@ import org.apache.logging.log4j.message.
  */
 public abstract class AbstractLogger implements Logger {
 
+    private static final String CATCHING = "catching";
     /**
      * Marker for flow tracing.
      */
@@ -157,7 +158,7 @@ public abstract class AbstractLogger imp
      */
     public void catching(Throwable t) {
         if (isEnabled(Level.DEBUG, CATCHING_MARKER, (Object) null, null)) {
-            log(CATCHING_MARKER, FQCN, Level.ERROR, new SimpleMessage("catching"), t);
+            log(CATCHING_MARKER, FQCN, Level.ERROR, new SimpleMessage(CATCHING), t);
         }
     }
 
@@ -169,7 +170,7 @@ public abstract class AbstractLogger imp
      */
     public void catching(Level level, Throwable t) {
         if (isEnabled(level, CATCHING_MARKER, (Object) null, null)) {
-            log(CATCHING_MARKER, FQCN, level, new SimpleMessage("catching"), t);
+            log(CATCHING_MARKER, FQCN, level, new SimpleMessage(CATCHING), t);
         }
     }
 



Mime
View raw message