Tomcat在Redhat上的catalina.out logrotate无法正常工作 [英] Tomcat catalina.out logrotate on redhat not working properly

查看:349
本文介绍了Tomcat在Redhat上的catalina.out logrotate无法正常工作的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试使用logrotate在Web服务器上推出log catalina.out。
我已经能够滚动日志并创建了一个日志 catalina.out-dateext
但是我注意到日志正在写入新文件 catalina.out-dateext 中。
网络服务器上需要做些什么吗?

I am trying to roll the log catalina.out on a webserver using logrotate. I have been able to roll the log and a log catalina.out-dateext is created. But I notice that the log is being written in the new file catalina.out-dateext. Is there something that need to be done on the webserver?

谢谢

推荐答案

/ etc / pex / tomcat 文件中添加 copytruncate 。有关所有选项的更多信息: vineetmanohar.com/2010/03/howto -rotate-tomcat-catalina-out

Add copytruncate in your /etc/pex/tomcat file. For more info about all the options: vineetmanohar.com/2010/03/howto-rotate-tomcat-catalina-out

这篇关于Tomcat在Redhat上的catalina.out logrotate无法正常工作的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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