logging-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ggreg...@apache.org
Subject svn commit: r1516684 - /logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/pattern/PatternFormatter.java
Date Fri, 23 Aug 2013 03:01:41 GMT
Author: ggregory
Date: Fri Aug 23 03:01:41 2013
New Revision: 1516684

URL: http://svn.apache.org/r1516684
Log:
Implement toString() for debugging.

Modified:
    logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/pattern/PatternFormatter.java

Modified: logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/pattern/PatternFormatter.java
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/pattern/PatternFormatter.java?rev=1516684&r1=1516683&r2=1516684&view=diff
==============================================================================
--- logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/pattern/PatternFormatter.java
(original)
+++ logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/pattern/PatternFormatter.java
Fri Aug 23 03:01:41 2013
@@ -44,4 +44,21 @@ public class PatternFormatter {
     public FormattingInfo getFormattingInfo() {
         return field;
     }
+    
+    /**
+     * Returns a String suitable for debugging.
+     * 
+     * @return a String suitable for debugging.
+     */
+    @Override
+    public String toString() {
+        StringBuilder sb = new StringBuilder();
+        sb.append(super.toString());
+        sb.append("[converter=");
+        sb.append(converter);
+        sb.append(", field=");
+        sb.append(field);
+        sb.append("]");
+        return sb.toString();
+    }
 }



Mime
View raw message