title: Log4j : Exclude Log from Console but create new log file for those logs
body: <p>My Java project contains following packages -
  com.main.log4j.main , com.main.log4j.other.</p>
  
  <p>I want log lines of package "com.main.log4j.other" to be removed from Console log, rather maintain a different log file for the same package. I am using Log4j version 1.2.16, with following log4j.xml config.</p>
  
  <pre><code>&lt;appender name="CONSOLE-LOG" class="org.apache.log4j.ConsoleAppender"&gt;
      &lt;param name="Target" value="System.out" /&gt;
      &lt;layout class="org.apache.log4j.PatternLayout"&gt;
          &lt;param name="ConversionPattern" value="..." /&gt;
      &lt;/layout&gt;
  &lt;/appender&gt;
  
  &lt;appender name="OTHER-LOG" class="org.apache.log4j.FileAppender"&gt;
      &lt;param name="File" value="logs/Others.log" /&gt;
      &lt;param name="Threshold" value="DEBUG" /&gt;
      &lt;layout class="org.apache.log4j.PatternLayout"&gt;
          &lt;param name="ConversionPattern" value="..." /&gt;
      &lt;/layout&gt;
  &lt;/appender&gt;
  
  &lt;category name="com.main.log4j.other"&gt;
      &lt;appender-ref ref="OTHER-LOG" /&gt;
  &lt;/category&gt;
  &lt;root&gt;
      &lt;level value="debug" /&gt;
      &lt;appender-ref ref="CONSOLE-LOG" /&gt;
  &lt;/root&gt;
  </code></pre>
  
  <p>Using this config, a separate log file Others.log is created with log line, but those log lines are still present in console log.
  I want to exclude them.
  Please suggest me how I can configure the log4j.xml?</p>