tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From fredk2 <>
Subject Tomcat 6 and log4j for a web application
Date Fri, 24 Aug 2007 21:07:05 GMT


still reading :-)

I have setup log4j as above, but with a little twist.
If you permission $CATALINA_HOME as read only and you want to customize the then you need to install the log4j1.2.14.jar and in $CATALINA_BASE/lib.
You also need to adjust the common.loader 


The tomcat logging works well. However, I have 2 questions related to
installing log4j for a web application:

1.  why does the documentation say to add log4j1.2.x.jar to the WEB-INF/lib, 
isn't it already loaded by the common.loader at this point?

2.  is there a way to add a WEB-INF/classes/ to log to
myapp1.log and capture all the logs related to the web application ?  Why
would'nt the following create a myapp1.log?

<myapp1>/WEB-INF/classes/ ->


# test logger,myapp1

# Log rotation
# Print the date in ISO 8601 format
log4j.appender.myapp1.layout.ConversionPattern=%d [%t] %-5p %c - %m%n

Any hints - suggestions are appreciated,
Many Thanks - Fred
View this message in context:
Sent from the Tomcat - User mailing list archive at

To start a new topic, e-mail:
To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message