logging-log4j-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Thorbjørn Ravn Andersen <thunderax...@gmail.com>
Subject Re: Problems with rollover of RollingFileAppender - data loss
Date Mon, 17 Nov 2008 12:11:01 GMT
dhallammail-log4j@yahoo.com skrev  den 16-11-2008 23:47:
> The problem that I have encountered is that I have observed that sometimes the log files
are getting partially wiped.  I am putting this down to the fact that the JVM might be shutting
down whilst the rolling activity is taking place - resulting in partially rolled files.  I
have tried adding a shutdown 
The rolling happens by renaming current files, not by copying contents 
from one file to another.  (See RollingFileAppender.rollOver() for code).

To me this sounds like that the log file is not properly closed when the 
application shuts down.

An idea might be running the application with the "log.debug" property 
set, so you can see what is actually happening (this means you need to 
save the console output somewhere)?  The suggested approach with doing 
socket appends might also be quite usable for you.


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

View raw message