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:12 UTC
[logging-log4j2] branch master 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 master
in repository https://gitbox.apache.org/repos/asf/logging-log4j2.git
The following commit(s) were added to refs/heads/master by this push:
new be80beb LOG4J2-1906 - Allow empty files to rollover. Should fix intermittent test failures
be80beb is described below
commit be80bebc412c1d073a4e252e676a90cefa9e1afe
Author: Ralph Goers <rg...@apache.org>
AuthorDate: Sat Jan 5 14:51:53 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 dfff57f..a7bcc07 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)