I am using Apache Jackrabbit as a content repository for a couple of web applications deployed to a single tomcat container. To get jackrabbit as a jndi resource I have added the jackrabbit jar and all it's dependencies (which includes slf4j and log4j) in tomcat/lib to make it available to all my web apps. However there is a problem with logging...
On start up log4j complains that there are no appends found:
log4j:WARN No appenders could be found for logger (org.apache.jackrabbit.core.config.ConfigurationErrorHandler).
log4j:WARN Please initialize the log4j system properly.
log4j:WARN See http://logging.apache.org/log4j/1.2/faq.html#noconfig for more info.
Now neither jackrabbit nor my web applications produce any logging statements.
I tried adding a log4j.xml config to the lib directory, no go. Also tried adding it directly in the jackrabbit jar with no luck.
How can I configure log4j for a dependency in the tomcat/lib as well as for each web application in tomcat?