I only would like to keep the Access Logs of the last n days created by Tomcat Access Log Valve. http://tomcat.apache.org/tomcat-6.0-doc/config/valve.html#Access%20Log%20Valve
But there seems to be no configuration-Attribute to define how long to keep the log-files? I guess this is because "Access Log Valve" only creates log files and doesn't delete them, is that correct?
You can delete all logs. Those from the current date will not be deletable while Tomcat is running, but that is ok.
The main Apache Tomcat configuration file is at /opt/bitnami/tomcat/conf/server. xml. Once Apache Tomcat starts, it will create several log files in the /opt/bitnami/tomcat/logs directory.
By default rotatable
is true for Access Log, so you will be having a new file created every 24 hours.
Tomcat itself does not do any housekeeping on the old files, the general principle on a Unix system is to have a cron job set up on the system to archive older files into a back up directory and/or delete them.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With