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] Trivial Update of "FAQ/Logging" by KonstantinKolinko
Date Fri, 13 Jul 2012 18:59:18 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:
http://wiki.apache.org/tomcat/FAQ/Logging?action=diff&rev1=21&rev2=22

Comment:
Correct several typos, add link to Commons Daemon

  
   * Prior to Tomcat 5.5, Tomcat provided a Logger element that you could configure and extend
according to your needs.
   * Starting with Tomcat 5.5, Logger was removed and [[http://commons.apache.org/logging/|Apache
Commons-Logging]] {{{Log}}} is used everywhere in Tomcat. Read the Commons-Logging documentation
if you'd like to know how to better use and configure Tomcat's internal logging. See also
http://tomcat.apache.org/tomcat-5.5-doc/logging.html
-  * In Tomcat 7 (and also 6), the logging code is based on a set of classes interacting with
the [[http://download.oracle.com/javase/6/docs/api/java/util/logging/package-summary.html|java.util.logging
API]] (JUL), which comes with Java since version 1.4. The Tomcat startup script configures
the JVM to uses a web-application-aware implementation of the [[http://download.oracle.com/javase/6/docs/api/java/util/logging/LogManager.html|JUL
LogManager]]. This Tomcat logging infrastructure is called JULI, and one can still distinguish
its Apache Commons Logging heritage, but the complex configuration has been edited out and
the package name changed. 
+  * In Tomcat 7 (and also 6), the logging code is based on a set of classes interacting with
the [[http://download.oracle.com/javase/6/docs/api/java/util/logging/package-summary.html|java.util.logging
API]] (JUL), which comes with Java since version 1.4. The Tomcat startup script configures
the JVM to use a web-application-aware implementation of the [[http://download.oracle.com/javase/6/docs/api/java/util/logging/LogManager.html|JUL
LogManager]]. This Tomcat logging infrastructure is called JULI, and one can still distinguish
its Apache Commons Logging heritage, but the complex configuration has been edited out and
the package name changed.
  
  {{http://public.m-plify.net/TomcatLogging.png}}
  
@@ -90, +90 @@

  
  If you really must rotate catalina.out, here are some techniques you can use:
  
-  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 ([[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. 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/.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).
  
  References to mailing list discussions:
-  * [[http://marc.info/?t=105544472600001&r=1&w=2a|tomcat-user thread from 2003]]
+  * [[http://marc.info/?t=105544472600001&r=1&w=2a|tomcat-users thread from 2003]]
-  * [[http://markmail.org/thread/2t6y5lf4dnx4nqpb|tomcat-user thread from 2009]]
+  * [[http://markmail.org/thread/2t6y5lf4dnx4nqpb|tomcat-users thread from 2009]]
-  * [[http://markmail.org/thread/oif7l27h4nqp3g4e|tomcat-user thread from 2011]]
+  * [[http://markmail.org/thread/oif7l27h4nqp3g4e|tomcat-users thread from 2011]]
-  * [[http://markmail.org/thread/3cjpvgjkpxrqrhlp|tomct-user thread from 2012]]
+  * [[http://markmail.org/thread/3cjpvgjkpxrqrhlp|tomcat-users thread from 2012]]
  
  <<Anchor(Q7)>>'''Where are the logs when running Tomcat as a Windows service?'''
  

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


Mime
View raw message