How to delete Tomcat Access Log after n days?

后端 未结 6 1752
伪装坚强ぢ
伪装坚强ぢ 2021-01-03 19:48

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%20Val

6条回答
  •  轻奢々
    轻奢々 (楼主)
    2021-01-03 20:37

    For Tomcat 7 you can config tomcat/conf/logging.properties. Example:

    1catalina.org.apache.juli.FileHandler.maxDays = 90
    

    Note: that 1 is not a typo.

    https://tomcat.apache.org/tomcat-7.0-doc/logging.html

提交回复
热议问题