Difference Between application log , Catalina Log and Localhost Log
Joined: Nov 22, 2007
In my application deployed in Tomcat 6.x we have the application log getting logged in to the application log file and the start up logs are getting into Catalina Log.
However some of the logs are getting into Localhost Log which are not logged into the app log.We are using log4j.property for logging.
Could you please let me know the exact difference between application log , Catalina Log and Localhost Log in Tomcat with some examples(if possible).
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.
The localhost log is the log for a virtual host within Tomcat. 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.
Each webapp 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.
Customer surveys are for companies who didn't pay proper attention to begin with.