Skip to content

Commit

Permalink
minor refactoring for better readability
Browse files Browse the repository at this point in the history
Signed-off-by: Ceki Gulcu <ceki@qos.ch>
  • Loading branch information
ceki committed Nov 6, 2023
1 parent f25df08 commit 7ae0a7b
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down

0 comments on commit 7ae0a7b

Please sign in to comment.