[ https://issues.apache.org/jira/browse/LOG4J2-1855?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15953640#comment-15953640 ]
ASF GitHub Bot commented on LOG4J2-1855: ---------------------------------------- Github user m-anthony commented on a diff in the pull request: https://github.com/apache/logging-log4j2/pull/68#discussion_r109441172 --- Diff: log4j-core/src/main/java/org/apache/logging/log4j/core/appender/rolling/TimeBasedTriggeringPolicy.java --- @@ -84,15 +91,18 @@ public boolean isTriggeringEvent(final LogEvent event) { * Creates a TimeBasedTriggeringPolicy. * @param interval The interval between rollovers. * @param modulate If true the time will be rounded to occur on a boundary aligned with the increment. + * @param maxRandomDelay If non-zero the rolling will be delayed by a random amount of time, up to the specified value (in seconds) * @return a TimeBasedTriggeringPolicy. */ @PluginFactory public static TimeBasedTriggeringPolicy createPolicy( @PluginAttribute("interval") final String interval, - @PluginAttribute("modulate") final String modulate) { + @PluginAttribute("modulate") final String modulate, + @PluginAttribute("maxRandomDelay") final int maxRandomDelay) { --- End diff -- Done > Add an optional random delay in TimeBasedTriggeringPolicy > --------------------------------------------------------- > > Key: LOG4J2-1855 > URL: https://issues.apache.org/jira/browse/LOG4J2-1855 > Project: Log4j 2 > Issue Type: New Feature > Components: Appenders > Affects Versions: 2.8.1 > Reporter: Anthony Maire > > When there are lots of JVM on the same physical host configured to rolling > their log file with a TimeBasedTriggeringPolicy, it will create a temporary > load that can impact the behavior of the applications since all JVM will roll > and compress the old file at the same time > The purpose of this enhancement is to add an additional property on > TimeBasedTriggeringPolicy to delay the rolling by a random amount of time to > avoid that massive simultaneous rolling. -- This message was sent by Atlassian JIRA (v6.3.15#6346) --------------------------------------------------------------------- To unsubscribe, e-mail: log4j-dev-unsubscr...@logging.apache.org For additional commands, e-mail: log4j-dev-h...@logging.apache.org