Win a copy of Think Java: How to Think Like a Computer Scientist this week in the Java in General forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Server loggng with log4j Tomcat 6.x

 
Jeff Gaer
Ranch Hand
Posts: 103
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I can get my web applications to log with out a problem but I dont see any messages from the tomcat server when I configure for log4j. Followed the instrucations at http://tomcat.apache.org/tomcat-6.0-doc/logging.html replacing the tomcat-juli.jar file in $CATALINA_HOME/bin with the one from extras and placing the log4j.jar and tomcat-juli-adapters.jar in the lib directory. Running with log4j debug I can see the categories registered. But never see any output from those categories. I do see the output if I replace the logging.properties file which causes the catalina.sh to use the default logging.
log4j: Handling log4j.additivity.org.apache.catalina=[null]
log4j: Parsing for [org] with value=[WARN].
log4j: Level token is [WARN].
log4j: Category org set to WARN
log4j: Handling log4j.additivity.org=[null]
log4j: Parsing for [org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/host-manager]] with value=[DEBUG, TOMCAT, TSOCK].
log4j: Level token is [DEBUG].
log4j: Category org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/host-manager] set to DEBUG
log4j: Parsing appender named "TOMCAT".
log4j: Appender "TOMCAT" was already parsed.
log4j: Parsing appender named "TSOCK".
log4j: Appender "TSOCK" was already parsed.
log4j: Handling log4j.additivity.org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/host-manager]=[null]
log4j: Parsing for [org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/manager]] with value=[DEBUG, TOMCAT, TSOCK].
log4j: Level token is [DEBUG].
log4j: Category org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/manager] set to DEBUG
log4j: Parsing appender named "TOMCAT".
log4j: Appender "TOMCAT" was already parsed.
log4j: Parsing appender named "TSOCK".
log4j: Appender "TSOCK" was already parsed.
log4j: Handling log4j.additivity.org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/manager]=[null]
log4j: Finished configuring.

Any help would be appreciated.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic