logging-log4j-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Paul <ppa...@yahoo.com>
Subject log4j rollover in est timezone not working as expected
Date Mon, 13 Feb 2012 16:14:38 GMT

Initially I setup log4j to rollover at midnight using the default machine (linux) timezone
which is GMT and everything worked correctly. I could see the timestamps before and after
rollover were correct. I then changed the time output to be in EST (log4j extras) but the
rollover still happens at midnight GMT or 5 hours too early. How can I get both time display
and rollover to work the same based on EST?

This is my current test property file:

log4j.appender.appender1.layout.conversionPattern=%d{yyyy-MM-dd HH:mm:ss.SSS}{EST} [%p] %c:%L
- %m%n
log4j.appender.appender1.DatePattern = '.'yyyy-MM-dd-HH-mm

When I look in the log file I can see the entries are in EST - so far so good. But when I
look at the last entry before rollover, I see:

INFO 2012-02-09 18:56:06 ...

so, we have a rollover around 7pm EST or midnight GMT but I want the rollover to happen at
midnight EST or 5 hours later. Right now the day boundaries are showing across two files which
makes troubleshooting application errors more difficult.

BTW, I'm using the 1.2.16 log4j binary and 1.1 extras.

thanks, Paul.

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

View raw message