We have very old application deployed in Linux server. We are using the RollingFileAppender which is deleting the old logs due to disk space problems.
Whenever we get a problem in the application most of the logs won’t available in the disk. If we compress the log files, we can keep 100 log files in place of one uncompressed log file.
Is there a way to compress the file once the log file is filled up and delete them after certain point of time [lets say a week.]
I tried with DailyRollingFileAppender, but it is not working the way we are expecting.
Maximum logs limit is 500. But the application creates 200 logs per hour. The actual logs which contains the error messages may not be available for us. So we are planning to zip all the log files and delete them after one week of time.
yes, kindly check this link. It has support for that.
Add this to RollingFileAppender configuration.