title: log4j log only messages from specific class in file
body: <p>In a external file I would like to log the output of my com.foo.test class to a specific file but whats happening is its appending the console log as well as file log. Below is my xml configuration,</p>
  
  <pre><code>&lt;appender name="FILE" class="org.jboss.logging.appender.DailyRollingFileAppender"&gt;
        &lt;errorHandler class="org.jboss.logging.util.OnlyOnceErrorHandler"/&gt;
        &lt;param name="File" value="${jboss.server.log.dir}/server.log"/&gt;
        &lt;param name="Append" value="false"/&gt;
  &lt;param name="DatePattern" value="'.'yyyy-MM-dd"/&gt;
   &lt;layout class="org.apache.log4j.PatternLayout"&gt;
  &lt;/layout&gt;
  &lt;/appender&gt;
  
  &lt;appender name="CONSOLE" class="org.apache.log4j.ConsoleAppender"&gt;
        &lt;errorHandler class="org.jboss.logging.util.OnlyOnceErrorHandler"/&gt;
        &lt;param name="Target" value="System.out"/&gt;
        &lt;param name="Threshold" value="INFO"/&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;appender name="MYTESTAPPENDER" class="org.jboss.logging.appender.RollingFileAppender"&gt;
          &lt;errorHandler class="org.jboss.logging.util.OnlyOnceErrorHandler"/&gt;
          &lt;param name="File" value="${jboss.server.home.dir}/log/mytest.log"/&gt;
          &lt;param name="Append" value="false"/&gt;
          &lt;param name="MaxFileSize" value="3MB"/&gt;
          &lt;param name="MaxBackupIndex" value="3"/&gt;
          &lt;layout class="org.apache.log4j.PatternLayout"&gt;
              &lt;param name="ConversionPattern" value="%d %-5p [%c] %m%n"/&gt;
          &lt;/layout&gt;
      &lt;/appender&gt;
   &lt;logger name="testsplitlogger" additivity="false"&gt;
  &lt;level value="info"/&gt;
   &lt;appender-ref ref="MYTESTAPPENDER"/&gt;
   &lt;/logger&gt;
   &lt;root&gt;
        &lt;appender-ref ref="CONSOLE"/&gt;
        &lt;appender-ref ref="FILE"/&gt;
        &lt;appender-ref ref="MYTESTAPPENDER"/&gt;
     &lt;/root&gt;
  </code></pre>
  
  <p>And My Java code is,</p>
  
  <pre><code>private static final Logger logger = Logger.getLogger("testsplitlogger");
  </code></pre>
  
  <p><strong>Update:</strong>
  The problem is its logging all the console output and other appenders output to mytest.log file instead I want to append only the info messages from my testsplitlogger for specific class and other logs from console and file should be written to server.log.</p>
  
  <p>Am I doing anything wrong?</p>