logging-log4j-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Matthieu Le Gall <mleg...@techworks.ie>
Subject DailyRollingFileAppender overwriting instead of rolling
Date Tue, 13 Jun 2006 10:41:10 GMT
Hi,

I am having a problem with the DailyRollingFileAppender.
Some nights it rolls exactly as it should. Some nights, instead of
rolling and creating a new log file, it writes the current log in the previous log (overwriting
the previous log file).
When it happens (and I couldn't figure out what event makes it happens), it always happens
between two consecutive days.

A quick look at the log files dates shows the overwriting problem on the 2006-04-10:
[tmbb@twmbase ~]$ ls -l /home/mlegall/logs/WebApp*
7584   Apr  8 23:45 /home/mlegall/logs/WebApp.2006-04-08.log
7584   Apr  9 23:45 /home/mlegall/logs/WebApp.2006-04-09.log
129734 Apr 11 09:15 /home/mlegall/logs/WebApp.2006-04-10.log
24003  Apr 11 10:11 /home/mlegall/logs/WebApp

Follow log4j.properties
################## APPENDER ##################
#Console
log4j.appender.Console=org.apache.log4j.ConsoleAppender
log4j.appender.Console.layout=org.apache.log4j.PatternLayout
log4j.appender.Console.layout.ConversionPattern=%-4r [%t] %-5p %c %x - %
m%n

#WebApp appender
log4j.appender.WebApp=org.apache.log4j.DailyRollingFileAppender
log4j.appender.WebApp.DatePattern='.'yyyy-MM-dd'.log'
log4j.appender.WebApp.File=/home/mlegall/logs/WebApp
log4j.appender.WebApp.layout=org.apache.log4j.PatternLayout
log4j.appender.WebApp.layout.ConversionPattern=%d %c{2} %n   %-5p %m%n

################## LOGGER ##################
log4j.logger.twm=DEBUG, Console

log4j.logger.twm.auth=DEBUG, WebApp
log4j.logger.twm.db=DEBUG, WebApp
log4j.logger.twm.exceptions=DEBUG, WebApp
log4j.logger.twm.nc=DEBUG, WebApp
log4j.logger.twm.util=DEBUG, WebApp
log4j.logger.twm.web=DEBUG, WebApp


Thanks for your help, any ideas or explanations welcome

Matthieu


---------------------------------------------------------------------
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