[logback-dev] svn commit: r1549 - logback/trunk/logback-core/src/main/java/ch/qos/logback/core/rolling

noreply.jncharpin at qos.ch noreply.jncharpin at qos.ch
Fri Jul 6 12:32:38 CEST 2007


Author: jncharpin
Date: Fri Jul  6 12:32:38 2007
New Revision: 1549

Modified:
   logback/trunk/logback-core/src/main/java/ch/qos/logback/core/rolling/TimeBasedRollingPolicy.java

Log:
Fixing bugs 80 and 82

Modified: logback/trunk/logback-core/src/main/java/ch/qos/logback/core/rolling/TimeBasedRollingPolicy.java
==============================================================================
--- logback/trunk/logback-core/src/main/java/ch/qos/logback/core/rolling/TimeBasedRollingPolicy.java	(original)
+++ logback/trunk/logback-core/src/main/java/ch/qos/logback/core/rolling/TimeBasedRollingPolicy.java	Fri Jul  6 12:32:38 2007
@@ -186,9 +186,9 @@
   }
 
   public boolean isTriggeringEvent(File activeFile, final Object event) {
-    //currentTime= System.currentTimeMillis();
+    long time= getCurrentTime();
 
-    if (getCurrentTime() >= nextCheck) {
+    if (time >= nextCheck) {
       //addInfo("Time to trigger roll-over");
       // We set the elapsedPeriodsFileName before we set the 'lastCheck' variable
       // The elapsedPeriodsFileName corresponds to the file name of the period
@@ -196,7 +196,7 @@
       elapsedPeriodsFileName = activeFileNamePattern.convertDate(lastCheck);
       //addInfo("elapsedPeriodsFileName set to "+elapsedPeriodsFileName);
 
-      lastCheck.setTime(currentTime);
+      lastCheck.setTime(time);
       nextCheck = rc.getNextCheckMillis(lastCheck);
 
       Date x = new Date();



More information about the logback-dev mailing list