Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: win32 uses procrun, not jsvc

...

  1. If you are using jsvc 1.0.4 or later to launch Tomcat, you can send SIGUSR1 to jsvc to get it to re-open its log files (Jira Ticket). You can couple this with 'logrotate' or your favorite log-rotation utility (including good-old 'mv' or 'rename') to re-name catalina.out at intervals and then get jsvc to re-open the original (catalina.out) file and continue writing to it. Note that Tomcat's win32 service is the same thing as jsvc, but you may have difficulty sending SIGUSR1 in a win32 environment.
  2. Use 'logrotate' with the 'copytruncate' option. This allows you to externally rotate catalina.out without changing anything within Tomcat.
  3. Modify bin/catalina.sh/.bat to pipe output from the JVM into a piped-logger such as chronolog or Apache httpd's rotatelogs (note that the previous reference is for Apache httpd documentation and *is not applicable to Tomcat* – it merely illustrates the concept).

...