Tomcat 8.5 org.apache.juli maxDays property not working

匆匆过客 提交于 2019-12-10 17:23:33

问题


I have wrote below configuration in my logging.properties:

2localhost.org.apache.juli.AsyncFileHandler.level = FINE
2localhost.org.apache.juli.AsyncFileHandler.directory = ${catalina.base}/logs
2localhost.org.apache.juli.AsyncFileHandler.maxDays=5
2localhost.org.apache.juli.AsyncFileHandler.prefix = localhost.

Logs write in log file perfectly but maxDays properties is not working. Means I have manually run my application after changing date up-to 6 days but log file not deleted after maxDays is reach.

Description of maxDays properties on https://tomcat.apache.org/tomcat-8.5-doc/logging.html: By default the log files will be kept on the file system forever. This may be changed per handler using the handlerName.maxDays property. If the specified value for the property is <=0 then the log files will be kept on the file system forever, otherwise they will be kept the specified maximum days.

Can you please help to verify applied configruation is correct or not ? or I understood maxDays properties usage wrong.


回答1:


Same problem here. Currently I'm using Tomcat 8.5.4. I found this link mentioning that I will need version 8.5.16 or higher to use this feature.

https://bz.apache.org/bugzilla/show_bug.cgi?id=61105



来源:https://stackoverflow.com/questions/45633872/tomcat-8-5-org-apache-juli-maxdays-property-not-working

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!