diff --git a/logback-core/src/main/java/ch/qos/logback/core/rolling/SizeAndTimeBasedFNATP.java b/logback-core/src/main/java/ch/qos/logback/core/rolling/SizeAndTimeBasedFNATP.java index a9907ed85d..ad968806ed 100755 --- a/logback-core/src/main/java/ch/qos/logback/core/rolling/SizeAndTimeBasedFNATP.java +++ b/logback-core/src/main/java/ch/qos/logback/core/rolling/SizeAndTimeBasedFNATP.java @@ -157,6 +157,10 @@ public boolean isTriggeringEvent(File activeFile, final E event) { return true; } + return checkSizeBasedTrigger(activeFile, currentTime); + } + + private boolean checkSizeBasedTrigger(File activeFile, long currentTime) { // next check for roll-over based on size if (invocationGate.isTooSoon(currentTime)) { return false; diff --git a/logback-core/src/main/java/ch/qos/logback/core/rolling/TimeBasedRollingPolicy.java b/logback-core/src/main/java/ch/qos/logback/core/rolling/TimeBasedRollingPolicy.java index ce9a1d0467..e75b4bf83b 100644 --- a/logback-core/src/main/java/ch/qos/logback/core/rolling/TimeBasedRollingPolicy.java +++ b/logback-core/src/main/java/ch/qos/logback/core/rolling/TimeBasedRollingPolicy.java @@ -227,6 +227,13 @@ public String getActiveFileName() { } } + /** + * Delegates to the underlying timeBasedFileNamingAndTriggeringPolicy. + * + * @param activeFile A reference to the currently active log file. + * @param event A reference to the current event. + * @return + */ public boolean isTriggeringEvent(File activeFile, final E event) { return timeBasedFileNamingAndTriggeringPolicy.isTriggeringEvent(activeFile, event); }