Every once in a while our catalina.out file gets very very large (yes, I will be implementing slf4j and logback in my applications to prevent this in the future). But for now, when I go to cycle the logs, I copy catalina.out to catalina.{date} and execute cat /dev/null > catalina.out
. The problem is, tomcat will capture no further logs after I do that, until tomcat is restarted the next morning, and this is not ideal. Why does this happen? And is there a way to avoid it?
out while tomcat is running, it will keep on logging to catalina. out which is removed already (reference of the file is hold by the tomcat ) hence the space will not be released. So you will need to restart the tomcat sever to release the space.
Answer: Yes the /linoma/goanywhere/tomcat/logs can be deleted. There are a number of different logs in the tomcat directory: admin. 2008-2-15, catalina.
The catalina.out log messages and log files communicate events and conditions that affect Tomcat server's operations. Logs for all identity applications components including OSP and Identity Reporting are also logged to the catalina.out file.
Easy as cake: echo > catalina.out
. The file descriptor won't change and java
can continue to write to that file.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With