You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@logging.apache.org by rg...@apache.org on 2019/01/05 21:52:27 UTC

[logging-log4j2] branch release-2.x updated: LOG4J2-1906 - Allow empty files to rollover. Should fix intermittent test failures

This is an automated email from the ASF dual-hosted git repository.

rgoers pushed a commit to branch release-2.x
in repository https://gitbox.apache.org/repos/asf/logging-log4j2.git


The following commit(s) were added to refs/heads/release-2.x by this push:
     new 5956a90  LOG4J2-1906 - Allow empty files to rollover. Should fix intermittent test failures
5956a90 is described below

commit 5956a907760d68149a677037121307ece807b0e1
Author: Ralph Goers <rg...@apache.org>
AuthorDate: Fri Jan 4 07:41:38 2019 -0700

    LOG4J2-1906 - Allow empty files to rollover. Should fix intermittent test failures
---
 .../logging/log4j/core/appender/rolling/TimeBasedTriggeringPolicy.java | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/log4j-core/src/main/java/org/apache/logging/log4j/core/appender/rolling/TimeBasedTriggeringPolicy.java b/log4j-core/src/main/java/org/apache/logging/log4j/core/appender/rolling/TimeBasedTriggeringPolicy.java
index d53b58a..fd5897a 100644
--- a/log4j-core/src/main/java/org/apache/logging/log4j/core/appender/rolling/TimeBasedTriggeringPolicy.java
+++ b/log4j-core/src/main/java/org/apache/logging/log4j/core/appender/rolling/TimeBasedTriggeringPolicy.java
@@ -127,9 +127,6 @@ public final class TimeBasedTriggeringPolicy extends AbstractTriggeringPolicy {
      */
     @Override
     public boolean isTriggeringEvent(final LogEvent event) {
-        if (manager.getFileSize() == 0) {
-            return false;
-        }
         final long nowMillis = event.getTimeMillis();
         if (nowMillis >= nextRolloverMillis) {
             nextRolloverMillis = ThreadLocalRandom.current().nextLong(0, 1 + maxRandomDelayMillis)