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=org.apache.log4j.DailyRollingFileAppender 
log4j.appender.appender1.File=report.log
log4j.appender.appender1.layout=org.apache.log4j.EnhancedPatternLayout
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: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to