You are viewing a plain text version of this content. The canonical link for it is here.
Posted to log4j-dev@logging.apache.org by Pierrick HYMBERT <pi...@gmail.com> on 2016/08/22 14:26:59 UTC

Regression in ConfigurationScheduler

Hello,

I am trying to test RollingFile/Policies/CronTriggeringPolicy with 2.6.2,
but facing a strange behavior:

==> After first run it call rollover() every time.

It looks there is a regression in the code according to
https://git-wip-us.apache.org/repos/asf?p=logging-log4j2.git;a=blobdiff;f=log4j-core/src/main/java/org/apache/logging/log4j/core/config/ConfigurationScheduler.java;h=744ed249221a04b0ac53d6867e1209b5a7d1d63b;hp=3364ca4f6ffde1afccbaffd1ac11266f5ad0783f;hb=HEAD;hpb=10f724f3043852ce7a70bbfa32fa460471a72f5d

final Date fireDate = cronExpression.getNextValidTimeAfter(now);
Was replaced by:
Date fireDate = cronExpression.getNextInvalidTimeAfter(new Date());

Could you please confirm my analysis, see patch attached.

Re: Regression in ConfigurationScheduler

Posted by Gary Gregory <ga...@gmail.com>.
Hi Perrick,

It would be most helpful if your patch could include a unit test showing
the problem in action.

Thank you!
Gary

On Mon, Aug 22, 2016 at 7:26 AM, Pierrick HYMBERT <
pierrick.hymbert@gmail.com> wrote:

> Hello,
>
> I am trying to test RollingFile/Policies/CronTriggeringPolicy with 2.6.2,
> but facing a strange behavior:
>
> ==> After first run it call rollover() every time.
>
> It looks there is a regression in the code according to
> https://git-wip-us.apache.org/repos/asf?p=logging-log4j2.
> git;a=blobdiff;f=log4j-core/src/main/java/org/apache/
> logging/log4j/core/config/ConfigurationScheduler.java;h=
> 744ed249221a04b0ac53d6867e1209b5a7d1d63b;hp=3364ca4f6ffde1afccbaffd1ac1126
> 6f5ad0783f;hb=HEAD;hpb=10f724f3043852ce7a70bbfa32fa460471a72f5d
>
> final Date fireDate = cronExpression.getNextValidTimeAfter(now);
> Was replaced by:
> Date fireDate = cronExpression.getNextInvalidTimeAfter(new Date());
>
> Could you please confirm my analysis, see patch attached.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: log4j-dev-unsubscribe@logging.apache.org
> For additional commands, e-mail: log4j-dev-help@logging.apache.org
>



-- 
E-Mail: garydgregory@gmail.com | ggregory@apache.org
Java Persistence with Hibernate, Second Edition
<http://www.manning.com/bauer3/>
JUnit in Action, Second Edition <http://www.manning.com/tahchiev/>
Spring Batch in Action <http://www.manning.com/templier/>
Blog: http://garygregory.wordpress.com
Home: http://garygregory.com/
Tweet! http://twitter.com/GaryGregory