I've a
tomcat server running multiple webapps.
They share some common libraries that I've placed in {tomcatroot}/shared/lib, and the libraries use Log4J for logging.
I'm trying to make each app to log to a different file. However, since they are calling the same library, and thus the same logger, all the logging get merged.
My attempts to solve this problem.
1. Put log4j.jar inside {tcroot}/shared/lib , and use separate initialization servlets/config file for each web app. The result is that logging goes to the last initialized webapp.
2. Put log4j.jar into WEB-INF/lib of each webapp, and use init servlets/conf file. That didn't work, as I get ClassNotFoundException for log4j, thrown from the libraries inside {tcroot}/shared/lib