• 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 ...
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
  • Mikalai Zaikin

How to get the tomcat internal log out?

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

I compile tomcat 5.5.30 and import it to eclipse as a project, to research how the tomcat load class , I need to view the running log ,after reading through this post(http://tomcat.apache.org/tomcat-5.5-doc/logging.html) and adding below log.properties to the direcotry 'common/classes' and log4j-1.26.jar to common/lib, logs turned out not to be generated when I debug the project starting from class Catalina. No idea about it, I've tried many times.

log4j.logger.org.apache.catalina.core.ContainerBase.[Catalina].[localhost]=DEBUG, R
log4j.logger.org.apache.catalina.core=DEBUG, R
log4j.logger.org.apache.catalina.session=DEBUG, R

And the program parameter I use is 'start', vm parameter is '-Dcatalina.home="I:\My Documents\program\java\projects\eclipse\mye9.0\TOMCAT_5_5_30\mybuild-5.5.30"'
Any ideas? Thanks

Kurt Xu
Saloon Keeper
Posts: 27876
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
1. Obligatory observation: the documentation on customizing Tomcat logging omits to make it clear that they're only talking about customizing the logging of the Tomcat server itself. Webapps are responsible individually for their own logfiles. This caused me a lot of confusion.

2. Tomcat 7 is now in production. I don't know what Tomcat 5.5's end-of-life schedule is, but I know of no compelling reason to use 5.5 anymore. Tomcat versions 6 and later no longer have 3 separate "lib" directories, so might as well get prepared.

3. On minor little detail you might have missed in all the confusion: In order to get Tomcat to use log4j instead of the default JULI logging, you have to actually build your own custom copy of Tomcat. It's not simply a config option. That's also going to be true in Tomcat 6 and Tomcat 7 as far as I'm aware.
    Bookmark Topic Watch Topic
  • New Topic