title: Perf4j Not Logging Correctly
body: <p>I setup some stop watch calls in my code to measure some code blocks and all the messages are going into my primary log and not into the timing log. The perfStats.log file gets created just fine but all the messages go to the root log which I didn't think was supposed to happen according to the docs I've read. Is there something obvious I'm missing here?</p>
  
  <p>perf4j tutorial <a href="http://perf4j.codehaus.org/devguide.html#Using_the_log4j_Appenders_to_Generate_Real-Time_Performance_Information" rel="nofollow noreferrer">link</a></p>
  
  <p>Example code</p>
  
  <pre><code>import org.apache.log4j.Logger;
  import org.perf4j.LoggingStopWatch;
  import org.perf4j.StopWatch;
  
  public class PerfLogger {
  
      /**
       * @param args
       */
      public static void main(String[] args) 
      {
          Logger  logger = Logger.getLogger(PerfLogger.class.getName());
  
          logger.info("Starting perf log test");
  
          StopWatch stopWatch = new LoggingStopWatch("test time");
  
          try {
              Thread.sleep(1000);
          } catch (InterruptedException e) {
              // TODO Auto-generated catch block
              e.printStackTrace();
          }
          stopWatch.stop();
  
      }
  
  }
  </code></pre>
  
  <p>Example log4j.xml  </p>
  
  <pre><code>&lt;log4j:configuration xmlns:log4j='http://jakarta.apache.org/log4j/'&gt;    
  
      &lt;appender name="STDOUT-DEBUG" class="org.apache.log4j.ConsoleAppender"&gt;
          &lt;layout class="org.apache.log4j.PatternLayout"&gt;
              &lt;param name="ConversionPattern" value="%d %-5p [%t]%x %M (%F:%L) - %m%n"/&gt;
          &lt;/layout&gt;
      &lt;/appender&gt;
  
  
     &lt;!-- Perf4J appenders --&gt;
      &lt;!--
         This AsyncCoalescingStatisticsAppender groups StopWatch log messages
         into GroupedTimingStatistics messages which it sends on the
         file appender defined below
      --&gt;
      &lt;appender name="CoalescingStatistics"
                class="org.perf4j.log4j.AsyncCoalescingStatisticsAppender"&gt;
          &lt;!--
            The TimeSlice option is used to determine the time window for which
            all received StopWatch logs are aggregated to create a single
            GroupedTimingStatistics log. Here we set it to 10 seconds, overriding
            the default of 30000 ms
          --&gt;
          &lt;param name="TimeSlice" value="10000"/&gt;
          &lt;appender-ref ref="fileAppender"/&gt;
      &lt;/appender&gt;
  
  
      &lt;!-- This file appender is used to output aggregated performance statistics --&gt;
      &lt;appender name="fileAppender" class="org.apache.log4j.FileAppender"&gt;
          &lt;param name="File" value="perfStats.log"/&gt;
          &lt;layout class="org.apache.log4j.PatternLayout"&gt;
              &lt;param name="ConversionPattern" value="%m%n"/&gt;
          &lt;/layout&gt;
      &lt;/appender&gt;
  
      &lt;!-- Loggers --&gt;
      &lt;!--
        The Perf4J logger. Note that org.perf4j.TimingLogger is the value of the
        org.perf4j.StopWatch.DEFAULT_LOGGER_NAME constant. Also, note that
        additivity is set to false, which is usually what is desired - this means
        that timing statements will only be sent to this logger and NOT to
        upstream loggers.
      --&gt;
      &lt;logger name="org.perf4j.TimingLogger" additivity="false"&gt;
          &lt;level value="INFO"/&gt;
          &lt;appender-ref ref="CoalescingStatistics"/&gt;
      &lt;/logger&gt;
  
      &lt;root&gt;
          &lt;priority value="info"/&gt;
          &lt;appender-ref ref="STDOUT-DEBUG"/&gt;
      &lt;/root&gt;
  
  &lt;/log4j:configuration&gt;
  </code></pre>