title: Configure common log4j xml for multiple sub projects
body: <p>I am trying to use a common log4j xml for subprojects in tomcat. There is a Parent project deployed already and part of the parent project are three other projects. Two projects A and B already exist and the logging works fine. I am adding a new project C and updated the log4j like below. I do see the ProjectC.log file being created (which is happening when tomcat starts up), but there are no Project C related log statements in this file (or any other file). This is my current log4j xml : </p>
  
  <pre><code>&lt;log4j:configuration xmlns:log4j="http://jakarta.apache.org/log4j/"
  debug="true"&gt;
  
  &lt;appender name="rootAppender" class="org.apache.log4j.ConsoleAppender"&gt;
      &lt;layout class="org.apache.log4j.PatternLayout"&gt; 
          &lt;param name="ConversionPattern" value="%d [%t] %-5p %c - %m%n"/&gt; 
      &lt;/layout&gt; 
  &lt;/appender&gt;
  
  &lt;appender name="ProjectAAppender" class="org.apache.log4j.RollingFileAppender"&gt;
      &lt;param name="file" value="${catalina.base}/logs/projectA.log"/&gt;
      &lt;param name="Append" value="true"/&gt;
      &lt;param name="MaxFileSize" value="100000KB"/&gt;
      &lt;param name="MaxBackupIndex" value="3"/&gt;
      &lt;layout class="org.apache.log4j.PatternLayout"&gt;
          &lt;param name="ConversionPattern" value="%d [%t] %-5p %c %x - %m%n"/&gt;
      &lt;/layout&gt;
  &lt;/appender&gt;
  
  &lt;appender name="ProjectBAppender" class="org.apache.log4j.RollingFileAppender"&gt;
      &lt;param name="file" value="${catalina.base}/logs/ProjectB.csv"/&gt;
      &lt;param name="Append" value="true"/&gt;
      &lt;param name="MaxFileSize" value="10000KB"/&gt;
      &lt;param name="MaxBackupIndex" value="3"/&gt;
      &lt;layout class="org.apache.log4j.PatternLayout"/&gt;
  &lt;/appender&gt;
  
  &lt;appender name="ProjectCAppender" class="org.apache.log4j.RollingFileAppender"&gt;
      &lt;param name="file" value="${catalina.base}/logs/ProjectC.log"/&gt;
      &lt;param name="Append" value="true"/&gt;
      &lt;param name="MaxFileSize" value="10000KB"/&gt;
      &lt;param name="MaxBackupIndex" value="3"/&gt;
      &lt;layout class="org.apache.log4j.PatternLayout"/&gt;
  &lt;/appender&gt;
  
  &lt;logger name="projA" additivity="true"&gt;
      &lt;level value ="DEBUG" /&gt;
      &lt;appender-ref ref="ProjectAAppender"/&gt;
  &lt;/logger&gt;
  &lt;logger name="projA.Performance" additivity="true"&gt;
      &lt;level value ="INFO" /&gt;
      &lt;appender-ref ref="ProjectBAppender"/&gt;
  &lt;/logger&gt;
  &lt;logger name="projC" additivity="true"&gt;
      &lt;level value ="DEBUG" /&gt;
      &lt;appender-ref ref="ProjectCAppender"/&gt;
  &lt;/logger&gt;   
  &lt;root&gt;
      &lt;priority value ="INFO" /&gt;
      &lt;appender-ref ref="rootAppender"/&gt;
  &lt;/root&gt;
  </code></pre>
  
  <p></p>
  
  <p>The way I get my log4j instance is using the slf4j LoggerFactory : </p>
  
  <pre><code>LoggerFactory.getLogger(clazz)
  </code></pre>
  
  <p>I have declared dependencies for log4j(1.2.14), slf4j-log4j12(1.4.1) jar files in my pom. 
  This setup works fine when I execute Project C independently (when running junit test cases).
  How can I make logging work for project C ? Any changes that I should be making to my log4j xml ? Thank you.</p>