Tomcat and Log4J
Saturday, January 19th, 2008After battling with several different configurations when it comes to logging and Tomcat 5.5.x, I decided to put together this guide for a simplistic approach. This assumes that you would like to use Log4J for both Tomcat’s internal logging as well as your deployed web application’s logging needs.
For the impatient, here are the steps:
- Place a log4j.properties file which uses the RollingFileAppender in common/classes.
- Add your log4j.jar to the common/lib directory.
- Add commons-logging.jar (1.0.4 or later) and log4j.jar to your application’s WEB-INF/lib directory.
- Add a log4j.properties OR log4j.xml file to your application’s WEB-INF/classes directory.

