title: Tomcat 6 and log4j application logging produce no output
body: <p>I'm trying to get log4j application (webapp) logging working in a Tomcat 6 app. I have log4j-1.2.15.jar in my WEB-INF directory, log4j.dtd and log4j.xml in WEB-INF/classes.</p>
  
  <p>My log4j.xml looks like:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
  &lt;!DOCTYPE log4j:configuration SYSTEM "log4j.dtd" &gt;
  &lt;log4j:configuration&gt;
  &lt;appender name="massAppender" class="org.apache.log4j.RollingFileAppender"&gt;
      &lt;param name="maxFileSize" value="100KB" /&gt;
      &lt;param name="maxBackupIndex" value="2" /&gt;
      &lt;param name="File" value="${catalina.home}/logs/mass.log" /&gt;
      &lt;layout class="org.apache.log4j.PatternLayout"&gt;
          &lt;param name="ConversionPattern" value="%d{ABSOLUTE} %5p %c{1}: %m%n " /&gt;
      &lt;/layout&gt;
  &lt;/appender&gt;
  
  &lt;category name="com.company.mass"&gt;
      &lt;priority value="DEBUG"/&gt;
      &lt;appender-ref ref="massAppender"/&gt;
  &lt;/category&gt;
  
  &lt;root&gt;
       &lt;appender-ref ref="massAppender" /&gt;
  &lt;/root&gt;
  
  &lt;/log4j:configuration&gt;
  </code></pre>
  
  <p>My servlet is in the package:</p>
  
  <pre><code>package com.company.mass;
  </code></pre>
  
  <p>where the logger is declared as:</p>
  
  <pre><code>private static Logger logger = Logger.getLogger(Handler.class);
  </code></pre>
  
  <p>and at the top of my doGet(...) method there is:</p>
  
  <pre><code>logger.error("foo");
  </code></pre>
  
  <p>When I deploy the app in Tomcat and go to the servlet, it works correctly. I even get a mass.log file, but nothing gets put in it. It doesn't show up in any other logs either, and there are no obvious errors. Any idea what's going on?</p>