logging-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ggreg...@apache.org
Subject svn commit: r1516462 - in /logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/appender/rolling: DefaultRolloverStrategy.java RollingFileManager.java TimeBasedTriggeringPolicy.java
Date Thu, 22 Aug 2013 14:36:59 GMT
Author: ggregory
Date: Thu Aug 22 14:36:58 2013
New Revision: 1516462

URL: http://svn.apache.org/r1516462
Log:
Rename RollingFileManager.getProcessor() to RollingFileManager.getPatternProcessor().

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/RollingFileManager.java
    logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/appender/rolling/TimeBasedTriggeringPolicy.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=1516462&r1=1516461&r2=1516462&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
Thu Aug 22 14:36:58 2013
@@ -115,7 +115,7 @@ public class DefaultRolloverStrategy imp
             }
 
             final StringBuilder buf = new StringBuilder();
-            manager.getProcessor().formatFileName(buf, fileIndex);
+            manager.getPatternProcessor().formatFileName(buf, fileIndex);
             final String currentFileName = manager.getFileName();
 
             String renameTo = subst.replace(buf);
@@ -158,7 +158,7 @@ public class DefaultRolloverStrategy imp
 
         final List<FileRenameAction> renames = new ArrayList<FileRenameAction>();
         final StringBuilder buf = new StringBuilder();
-        manager.getProcessor().formatFileName(buf, lowIndex);
+        manager.getPatternProcessor().formatFileName(buf, lowIndex);
 
         String lowFilename = subst.replace(buf);
 
@@ -203,7 +203,7 @@ public class DefaultRolloverStrategy imp
                 //   if intermediate index
                 //     add a rename action to the list
                 buf.setLength(0);
-                manager.getProcessor().formatFileName(buf, i + 1);
+                manager.getPatternProcessor().formatFileName(buf, i + 1);
 
                 final String highFilename = subst.replace(buf);
                 String renameTo = highFilename;
@@ -252,7 +252,7 @@ public class DefaultRolloverStrategy imp
 
         final List<FileRenameAction> renames = new ArrayList<FileRenameAction>();
         final StringBuilder buf = new StringBuilder();
-        manager.getProcessor().formatFileName(buf, highIndex);
+        manager.getPatternProcessor().formatFileName(buf, highIndex);
 
         String highFilename = subst.replace(buf);
 
@@ -306,7 +306,7 @@ public class DefaultRolloverStrategy imp
                 //   if intermediate index
                 //     add a rename action to the list
                 buf.setLength(0);
-                manager.getProcessor().formatFileName(buf, i - 1);
+                manager.getPatternProcessor().formatFileName(buf, i - 1);
 
                 final String lowFilename = subst.replace(buf);
                 String renameTo = lowFilename;
@@ -319,7 +319,7 @@ public class DefaultRolloverStrategy imp
                 highFilename = lowFilename;
             } else {
                 buf.setLength(0);
-                manager.getProcessor().formatFileName(buf, i - 1);
+                manager.getPatternProcessor().formatFileName(buf, i - 1);
 
                 highFilename = subst.replace(buf);
             }

Modified: logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/appender/rolling/RollingFileManager.java
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/appender/rolling/RollingFileManager.java?rev=1516462&r1=1516461&r2=1516462&view=diff
==============================================================================
--- logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/appender/rolling/RollingFileManager.java
(original)
+++ logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/appender/rolling/RollingFileManager.java
Thu Aug 22 14:36:58 2013
@@ -41,7 +41,7 @@ public class RollingFileManager extends 
 
     private long size;
     private long initialTime;
-    private final PatternProcessor processor;
+    private final PatternProcessor patternProcessor;
     private final Semaphore semaphore = new Semaphore(1);
     private final TriggeringPolicy policy;
     private final RolloverStrategy strategy;
@@ -54,7 +54,7 @@ public class RollingFileManager extends 
         this.initialTime = time;
         this.policy = policy;
         this.strategy = strategy;
-        processor = new PatternProcessor(pattern);
+        patternProcessor = new PatternProcessor(pattern);
         policy.initialize(this);
     }
 
@@ -126,8 +126,8 @@ public class RollingFileManager extends 
      * Returns the pattern processor.
      * @return The PatternProcessor.
      */
-    public PatternProcessor getProcessor() {
-        return processor;
+    public PatternProcessor getPatternProcessor() {
+        return patternProcessor;
     }
 
     private boolean rollover(final RolloverStrategy strategy) {

Modified: logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/appender/rolling/TimeBasedTriggeringPolicy.java
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/appender/rolling/TimeBasedTriggeringPolicy.java?rev=1516462&r1=1516461&r2=1516462&view=diff
==============================================================================
--- logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/appender/rolling/TimeBasedTriggeringPolicy.java
(original)
+++ logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/appender/rolling/TimeBasedTriggeringPolicy.java
Thu Aug 22 14:36:58 2013
@@ -46,7 +46,7 @@ public final class TimeBasedTriggeringPo
     @Override
     public void initialize(final RollingFileManager manager) {
         this.manager = manager;
-        nextRollover = manager.getProcessor().getNextTime(manager.getFileTime(), interval,
modulate);
+        nextRollover = manager.getPatternProcessor().getNextTime(manager.getFileTime(), interval,
modulate);
     }
 
     /**
@@ -61,7 +61,7 @@ public final class TimeBasedTriggeringPo
         }
         final long now = System.currentTimeMillis();
         if (now > nextRollover) {
-            nextRollover = manager.getProcessor().getNextTime(now, interval, modulate);
+            nextRollover = manager.getPatternProcessor().getNextTime(now, interval, modulate);
             return true;
         }
         return false;



Mime
View raw message