logging-log4j-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Michael Erskine <michael.ersk...@ketech.com>
Subject RE: expiry of DailyRollingFileAppender old logs
Date Mon, 10 Dec 2007 13:58:04 GMT
Whoops!

>         long now = System.currentTimeMillis();
>         File[] files = getExpiredLogfiles(fileNameRoot, datePattern, null,
>                 new Date(now + maxage));

That Date should be new Date(now - maxAge) since maxAge is defined as...

    private static long maxage = 7 * DateUtils.MILLIS_PER_DAY;

...using Jakarta Commons Lang DateUtils.



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


Mime
View raw message