logging-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rpo...@apache.org
Subject svn commit: r1552975 - in /logging/log4j/log4j2/trunk: log4j-core/src/main/java/org/apache/logging/log4j/core/appender/rolling/TimeBasedTriggeringPolicy.java src/changes/changes.xml
Date Sun, 22 Dec 2013 09:08:20 GMT
Author: rpopma
Date: Sun Dec 22 09:08:20 2013
New Revision: 1552975

URL: http://svn.apache.org/r1552975
Log:
Fix for Log4j2-454: TimeBasedTriggeringPolicy should use event time millis

Modified:
    logging/log4j/log4j2/trunk/log4j-core/src/main/java/org/apache/logging/log4j/core/appender/rolling/TimeBasedTriggeringPolicy.java
    logging/log4j/log4j2/trunk/src/changes/changes.xml

Modified: logging/log4j/log4j2/trunk/log4j-core/src/main/java/org/apache/logging/log4j/core/appender/rolling/TimeBasedTriggeringPolicy.java
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/log4j-core/src/main/java/org/apache/logging/log4j/core/appender/rolling/TimeBasedTriggeringPolicy.java?rev=1552975&r1=1552974&r2=1552975&view=diff
==============================================================================
--- logging/log4j/log4j2/trunk/log4j-core/src/main/java/org/apache/logging/log4j/core/appender/rolling/TimeBasedTriggeringPolicy.java
(original)
+++ logging/log4j/log4j2/trunk/log4j-core/src/main/java/org/apache/logging/log4j/core/appender/rolling/TimeBasedTriggeringPolicy.java
Sun Dec 22 09:08:20 2013
@@ -59,7 +59,7 @@ public final class TimeBasedTriggeringPo
         if (manager.getFileSize() == 0) {
             return false;
         }
-        final long now = System.currentTimeMillis();
+        final long now = event.getMillis();
         if (now > nextRollover) {
             nextRollover = manager.getPatternProcessor().getNextTime(now, interval, modulate);
             return true;

Modified: logging/log4j/log4j2/trunk/src/changes/changes.xml
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/src/changes/changes.xml?rev=1552975&r1=1552974&r2=1552975&view=diff
==============================================================================
--- logging/log4j/log4j2/trunk/src/changes/changes.xml (original)
+++ logging/log4j/log4j2/trunk/src/changes/changes.xml Sun Dec 22 09:08:20 2013
@@ -21,6 +21,9 @@
   </properties>
   <body>
     <release version="2.0-RC1" date="2013-MM-DD" description="Bug fixes and enhancements">
+      <action issue="LOG4J2-454" dev="rpopma" type="fix" due-to="Robin Zhang Tao">
+        TimeBasedTriggeringPolicy should use event time millis.
+      </action>
       <action issue="LOG4J2-472" dev="rpopma" type="fix" due-to="Tal Liron">
         BaseConfiguration class does not properly implement Configuration interface.
       </action>



Mime
View raw message