Tomcat 8.5 org.apache.juli maxDays属性不起作用 [英] Tomcat 8.5 org.apache.juli maxDays property not working

查看:531
本文介绍了Tomcat 8.5 org.apache.juli maxDays属性不起作用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在logging.properties中编写了以下配置:

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.

日志可以完美地写入日志文件,但是maxDays属性不起作用.意味着在更改日期(最多6天)后,我已经手动运行了我的应用程序,但是在达到maxDays之后,日志文件并未删除.

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.

https://tomcat.apache.org/上的maxDays属性的描述tomcat-8.5-doc/logging.html :默认情况下,日志文件将永久保存在文件系统中.可以使用handlerName.maxDays属性针对每个处理程序更改此设置.如果该属性的指定值< = 0,则日志文件将永远保存在文件系统上,否则将保留指定的最长天数.

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.

能否请您帮助验证所应用的配置是否正确?或我理解maxDays属性用法错误.

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

推荐答案

需要新的Tomcat版本

这里有同样的问题.目前,我正在使用Tomcat 8.5.4.我发现此链接提到我需要8.5.16或更高版本才能使用此功能.

Needs new Tomcat version

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#c14 :

新功能已反向移植到:
-8.5.x起8.5.16起
-8.0.x起8.0.45起
-7.0.x(适用于7.0.79及更高版本)

The new functionality was back ported to:
- 8.5.x for 8.5.16 onwards
- 8.0.x for 8.0.45 onwards
- 7.0.x for 7.0.79 onwards

有关详细信息,请参阅更改日志中标记为"61105"的条目:

For details see entries tagged "61105" in changelogs:

  • https://tomcat.apache.org/tomcat-7.0-doc/changelog.html
  • https://tomcat.apache.org/tomcat-8.0-doc/changelog.html
  • https://tomcat.apache.org/tomcat-8.5-doc/changelog.html

这篇关于Tomcat 8.5 org.apache.juli maxDays属性不起作用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆