logging-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ggreg...@apache.org
Subject svn commit: r1396348 - in /logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core: appender/rolling/ pattern/
Date Tue, 09 Oct 2012 21:44:20 GMT
Author: ggregory
Date: Tue Oct  9 21:44:20 2012
New Revision: 1396348

URL: http://svn.apache.org/viewvc?rev=1396348&view=rev
Log:
Flip args and use varargs.

Modified:
    logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/appender/rolling/PatternProcessor.java
    logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/pattern/ArrayPatternConverter.java
    logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/pattern/DatePatternConverter.java
    logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/pattern/IntegerPatternConverter.java
    logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/pattern/LiteralPatternConverter.java

Modified: logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/appender/rolling/PatternProcessor.java
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/appender/rolling/PatternProcessor.java?rev=1396348&r1=1396347&r2=1396348&view=diff
==============================================================================
--- logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/appender/rolling/PatternProcessor.java
(original)
+++ logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/appender/rolling/PatternProcessor.java
Tue Oct  9 21:44:20 2012
@@ -144,7 +144,7 @@ public class PatternProcessor {
     protected final void formatFileName(final StringBuilder buf, final Object... objects)
{
         for (int i = 0; i < patternConverters.length; i++) {
             int fieldStart = buf.length();
-            patternConverters[i].format(objects, buf);
+            patternConverters[i].format(buf, objects);
 
             if (patternFields[i] != null) {
                 patternFields[i].format(fieldStart, buf);

Modified: logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/pattern/ArrayPatternConverter.java
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/pattern/ArrayPatternConverter.java?rev=1396348&r1=1396347&r2=1396348&view=diff
==============================================================================
--- logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/pattern/ArrayPatternConverter.java
(original)
+++ logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/pattern/ArrayPatternConverter.java
Tue Oct  9 21:44:20 2012
@@ -23,8 +23,8 @@ public interface ArrayPatternConverter e
 
     /**
      * Format an array of Objects.
-     * @param objects The Object array.
      * @param toAppendTo The StringBuilder to add the content to.
+     * @param objects The Object array.
      */
-    void format(Object[] objects, final StringBuilder toAppendTo);
+    void format(final StringBuilder toAppendTo, Object... objects);
 }

Modified: logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/pattern/DatePatternConverter.java
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/pattern/DatePatternConverter.java?rev=1396348&r1=1396347&r2=1396348&view=diff
==============================================================================
--- logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/pattern/DatePatternConverter.java
(original)
+++ logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/pattern/DatePatternConverter.java
Tue Oct  9 21:44:20 2012
@@ -138,7 +138,7 @@ public final class DatePatternConverter 
         output.append(cachedDate);
     }
 
-    public void format(Object[] objects, final StringBuilder toAppendTo) {
+    public void format(final StringBuilder toAppendTo, Object... objects) {
         for (Object obj : objects) {
             if (obj instanceof Date) {
                 format(obj, toAppendTo);

Modified: logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/pattern/IntegerPatternConverter.java
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/pattern/IntegerPatternConverter.java?rev=1396348&r1=1396347&r2=1396348&view=diff
==============================================================================
--- logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/pattern/IntegerPatternConverter.java
(original)
+++ logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/pattern/IntegerPatternConverter.java
Tue Oct  9 21:44:20 2012
@@ -51,7 +51,7 @@ public final class IntegerPatternConvert
         return INSTANCE;
     }
 
-    public void format(Object[] objects, final StringBuilder toAppendTo) {
+    public void format(final StringBuilder toAppendTo, Object... objects) {
         for (Object obj : objects) {
             if (obj instanceof Integer) {
                 format(obj, toAppendTo);

Modified: logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/pattern/LiteralPatternConverter.java
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/pattern/LiteralPatternConverter.java?rev=1396348&r1=1396347&r2=1396348&view=diff
==============================================================================
--- logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/pattern/LiteralPatternConverter.java
(original)
+++ logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/pattern/LiteralPatternConverter.java
Tue Oct  9 21:44:20 2012
@@ -64,7 +64,7 @@ public final class LiteralPatternConvert
     /**
      * {@inheritDoc}
      */
-    public void format(Object[] objects, final StringBuilder output) {
+    public void format(final StringBuilder output, Object... objects) {
         output.append(substitute ? config.getSubst().replace(literal) : literal);
     }
 }



Mime
View raw message