tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Apache Wiki <wikidi...@apache.org>
Subject [Tomcat Wiki] Update of "FAQ/Logging" by KonstantinKolinko
Date Fri, 11 Mar 2016 00:27:11 GMT
Dear Wiki user,

You have subscribed to a wiki page or wiki category on "Tomcat Wiki" for change notification.

The "FAQ/Logging" page has been changed by KonstantinKolinko:
https://wiki.apache.org/tomcat/FAQ/Logging?action=diff&rev1=24&rev2=25

Comment:
Add reference to BZ 53930 "allow capture of catalina stdout/stderr to a command instead of
just a file"

  
   1. If you are using jsvc 1.0.4 or later (from [[http://commons.apache.org/daemon/|Apache
Commons Daemon]] project) to launch Tomcat, you can send SIGUSR1 signal to jsvc to get it
to re-open its log files ([[https://issues.apache.org/jira/browse/DAEMON-95|Jira Ticket]]).
You can couple this with 'logrotate' or your favorite log-rotation utility (including good-old
'mv') to re-name catalina.out at intervals and then get jsvc to re-open the original (catalina.out)
file and continue writing to it.
   1. Use 'logrotate' with the 'copytruncate' option. This allows you to externally rotate
catalina.out without changing anything within Tomcat.
-  1. Modify bin/catalina.sh (or bin/catalina.bat) to pipe output from the JVM into a piped-logger
such as [[http://www.cronolog.org/|chronolog]] or Apache httpd's [[http://httpd.apache.org/docs/2.2/logs.html#piped|rotatelogs]]
(note that the previous reference is for Apache httpd documentation and *is not applicable
to Tomcat* -- it merely illustrates the concept).
+  1. Modify bin/catalina.sh (or bin/catalina.bat) to pipe output from the JVM into a piped-logger
such as [[http://www.cronolog.org/|chronolog]] or Apache httpd's [[http://httpd.apache.org/docs/2.2/logs.html#piped|rotatelogs]]
(note that the previous reference is for Apache httpd documentation and *is not applicable
to Tomcat* -- it merely illustrates the concept).<<BR>>See also the patch in [[https://bz.apache.org/bugzilla/show_bug.cgi?id=53930|Bug
53930, "Allow capture of catalina stdout/stderr to a command instead of just a file"]].
  
  References to mailing list discussions:
   * [[http://marc.info/?t=105544472600001&r=1&w=2a|tomcat-users thread from 2003]]

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


Mime
View raw message