How to clear Catalina Out without disabling further logging?

Our Catalina The out file becomes very large every once in a while (yes, I implemented slf4j and logback in my application to prevent this in the future) But now, when I go to the circular log, I will Catalina Out copy to Catalina {date} and execute cat / dev / null > Catalina Out The problem is that after I do this, Tomcat will no longer capture logs until Tomcat restarts the next morning, which is not ideal Why is that? Is there any way to avoid it?

Solution

As easy as a cake: echo > Catalina Out The file descriptor will not change, and Java can continue to write to the file

The content of this article comes from the network collection of netizens. It is used as a learning reference. The copyright belongs to the original author.
THE END
分享
二维码
< <上一篇
下一篇>>