• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Difference Between application log , Catalina Log and Localhost Log

 
Ranch Hand
Posts: 69
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi

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).


Regards
Abhishek Rath
 
Saloon Keeper
Posts: 27763
196
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.

 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic