Monday, August 16, 2004 09:29 PM
I think you really are supposed to put a copy of log4j.jar into each web application's WEB-INF/lib directory. If they are in WAR files, put the jar in the war file. If they are in EAR files, put the jar in the WAR file inside the EAR file.
For the rest, for EJB's and other Jar's outside of WAR's, I think we also put a separate copy of log4j.jar in the top-level directory of each EJB Jar file.
I think there are some articles on what to watch out for, re classloader problems when using log4j in EJB's, and someone posted the URL's here sometime ago, so search/browse through old postings here for them (under this Log4j topic).
Also you know (or you should know!) that in one single log4j config file, you can define multiple Appenders, say RollingFileAppenders writing out to different files, and you can attach different loggers to different Appenders.