Tomcat application log , Catalina Log and Localhost Log

The catalina log is the global log. It is, in fact, the stdout stream for the Tomcat JVM. Tomcat's internal log statements use the java.util.logging package (juli) to log, and the default destination for that log is stdout. The Tomcat run scripts handle the redirection of stdout to a file. catalina.out should be where standard error and standard output for the Tomcat process are redirected.

The localhost log is the log for a virtual host within Tomcat.  localhost.log is dependent on how you
configure any <Loggers> in your server.xml.  Usually there's not much of interest in it, but when you cannot find an error in catalina.out and something is seriously wrong, check this file.

The application log (each webapp application) is responsible for its own logging. Tomcat provides no support for application logs at all unless you want to count the old servlet log function that did a brain-dead write to Tomcat stdout. You can use any logger you want to in your webapp, including log4j, juli, apache commons logging, or - as in the case of some of my more complex apps, several of the preceeding, merged and co-ordinated by a master log manager (you have this issue when some of the pre-written third-party components in your webapp are using other loggers). Each webapp therefore is also responsible for its own log configuration.

No comments :

Post a Comment