logging-log4j-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From 张涛 <robi...@gmail.com>
Subject LOG4J2-454: TimeBasedTriggeringPolicy should use event time millis
Date Fri, 22 Nov 2013 08:11:53 GMT

In the TimeBasedTriggeringPolicy.java, it's using system current timestamp
to compare with nextRollover time:
final long now = *System.currentTimeMillis();*
if (now > nextRollover) { ... ....

But I think, it should use the event time millis:
final long now = *event.getMillis();*
if (now > nextRollover) {... ...

According the event time millis, it can be System.currentTimeMillis or
Message's timestamp if the message implements TimestampMessage.

So I think the event.getMillis() would be the best choice for comparing
with nextRollover time.

View raw message