Posts

Showing posts from January, 2009

Logging Tomcat 6 startup via log4j

For a recent task I had the need to log the tomcat startup process via log4j (so I could view it in eclipse using the log4eclipse plugin). The simple copying log4j.properties and log4j.jar into TOMCAT/lib didn't work as it had for previous versions. After some quick digging around I finally read the right section of the documentation . The steps are pretty easy to follow. The jar of juli (their logger) that comes with the standard build doesn't allow for commons-logging. To get it to work you need to download the source and compile the extras commons-logging. Which is a simple: ant download ant build-only ant -f extras.xml commons-logging Next: Replace $CATALINA_HOME/bin/tomcat-juli.jar with output/extras/tomcat-juli.jar . Place output/extras/tomcat-juli-adapters.jar in $CATALINA_HOME/lib. For apache-tomcat-6.0.14-src you'll need to change build.properties.default line 45: jdt.loc=http://archive.eclipse.org/eclipse/downloads/drops/R-3.2.2-200702121330/e