logging-commits mailing list archives

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

URL: http://svn.apache.org/viewvc?rev=1396349&view=rev
Log:
Flip args to match sibling API that uses varargs.

Modified:
    logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/appender/rolling/DefaultRolloverStrategy.java
    logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/appender/rolling/PatternProcessor.java

Modified: logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/appender/rolling/DefaultRolloverStrategy.java
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/appender/rolling/DefaultRolloverStrategy.java?rev=1396349&r1=1396348&r2=1396349&view=diff
==============================================================================
--- logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/appender/rolling/DefaultRolloverStrategy.java
(original)
+++ logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/appender/rolling/DefaultRolloverStrategy.java
Tue Oct  9 21:45:30 2012
@@ -110,7 +110,7 @@ public class DefaultRolloverStrategy imp
             }
 
             StringBuilder buf = new StringBuilder();
-            manager.getProcessor().formatFileName(purgeStart, buf);
+            manager.getProcessor().formatFileName(buf, purgeStart);
             String currentFileName = manager.getFileName();
 
             String renameTo = subst.replace(buf);
@@ -147,7 +147,7 @@ public class DefaultRolloverStrategy imp
 
         List<FileRenameAction> renames = new ArrayList<FileRenameAction>();
         StringBuilder buf = new StringBuilder();
-        manager.getProcessor().formatFileName(lowIndex, buf);
+        manager.getProcessor().formatFileName(buf, lowIndex);
 
         String lowFilename = subst.replace(buf);
 
@@ -192,7 +192,7 @@ public class DefaultRolloverStrategy imp
                 //   if intermediate index
                 //     add a rename action to the list
                 buf.setLength(0);
-                manager.getProcessor().formatFileName(i + 1, buf);
+                manager.getProcessor().formatFileName(buf, i + 1);
 
                 String highFilename = subst.replace(buf);
                 String renameTo = highFilename;

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=1396349&r1=1396348&r2=1396349&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:45:30 2012
@@ -128,11 +128,10 @@ public class PatternProcessor {
 
     /**
      * Format file name.
-     *
-     * @param obj object to be evaluated in formatting, may not be null.
      * @param buf string buffer to which formatted file name is appended, may not be null.
+     * @param obj object to be evaluated in formatting, may not be null.
      */
-    protected final void formatFileName(final Object obj, final StringBuilder buf) {
+    protected final void formatFileName(final StringBuilder buf, final Object obj) {
         formatFileName(buf, new Date(System.currentTimeMillis()), obj);
     }
 



Mime
View raw message