Page tree

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
languagebash
cd /opt/apache/tomcat.1/bin/
 
# For Tomcat 8
 
# Turns off the creation of the generic file.
sed -i 's/touch "$CATALINA_OUT"/#touch "$CATALINA_OUT"/' catalina.sh
 
# Uses cronolog to rotate.
sed -i 's/>> "$CATALINA_OUT" 2>&1 "&"/2>&1 |/usr/bin/cronolog "$CATALINA_BASE/logs/catalina-%Y-%m-%d.out" &/' catalina.sh

This solution comes from SpringSource. Not super happy with this solution, so let me know if you find something better. I last looked May 2016. VMWare who now owns SpringSource. Caveat is that the incorrect process ID being written to the process ID file so I don't like this solution as it will impact shutdown scripts.

Windows

Warning

TBC - Research and a solution needs to be found for this.

This article by SpringSource uses cronolog (they know Tomcat so well they created a variation with more Enterprise features looks promising").

Apache Tomcat's position is to not fix in the near future (we disagree as enough restarts will cause the problem with the log file) and the same article also provides some solutions too.

...