Summary: Enable different Log4J per application
AssignedTo: log4j-dev@logg... ReportedBy: moreira@priv...
--- Comment #0 from Luciana Moreira <moreira@priv...> 2009-08-31 08:05:47 PDT ---
This is not a bug but rather an enhancement request.
We use Log4J in our project where several web applications run on Tomcat. We
would like to have different log files per application.
It seems that this is only feasible if we include the log4j.jar on the
WEB_INF/lib directory of each application instead of TOMCAT_HOME/lib. This
happens since the configuration of log4J contains static variables and values
are shared among all applications if the jar is put to TOMCAT_HOME/common/lib.
Putting the jar file in each WEB-INF/lib forces the classloader to reload the
class and set independent values to the configuration.
In our application server we have to reduce the amount of jar files put into
each application to reduce the memory usage. Using one log4j.jar per
application is something we would like to avoid.
So the request would be to either separate the jar files to have one that is
put into common/lib and a small second one to be put into WEB-INF/lib, or to
extend the architecture to enable the configuration of log4j per application
without the need for jar files into WEB-INF/lib.