logging-log4j-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Curt Arnold <carn...@apache.org>
Subject Re: how do i delete log files
Date Tue, 21 Jun 2005 03:09:34 GMT
On a Unix-like platform, you can just write your log files to the / 
tmp directory which will be deleted on the next restart.  You can use  
"${java.io.tmpdir}" in a configuration file to specify that in a  
platform-independent manner, but I do not believe that temporary  
directories get deleted automatically on Windows.

Or you can use a RollingFileAppender which would allow you to specify  
a maximum file size that a log file should be able grow to before  
being closed and renamed and specify the maximum number of old log  
files that should be preserved.


On Jun 20, 2005, at 5:30 PM, Qian Wang wrote:

> how do i delete log files automatically?
>
> thank you all very much.


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