logging-log4j-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF GitHub Bot (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (LOG4J2-1855) Add an optional random delay in TimeBasedTriggeringPolicy
Date Mon, 03 Apr 2017 08:25:41 GMT

    [ https://issues.apache.org/jira/browse/LOG4J2-1855?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15953115#comment-15953115

ASF GitHub Bot commented on LOG4J2-1855:

Github user m-anthony commented on a diff in the pull request:

    --- 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.
         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 --
    OK I will do that :+1: 

> 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
> 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

To unsubscribe, e-mail: log4j-dev-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-dev-help@logging.apache.org

View raw message