title: java log4j 2 System.out.println turn off
body: <p>In My code:</p>
  
  <pre><code>System.out.println("hello println");
  mylogger.info("hello info");
  mylogger.debug("hello debug");
  </code></pre>
  
  <p>I want only log from logger in my console (no print "hello println" via System.out.println):</p>
  
  <p><strong>hello info</strong></p>
  
  <p><strong>hello debug</strong></p>
  
  <p>My log4j file is:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8" ?&gt;
  &lt;!DOCTYPE log4j:configuration SYSTEM "log4j.dtd"&gt;
  &lt;log4j:configuration xmlns:log4j='http://jakarta.apache.org/log4j/'&gt;
  
      &lt;appender name="consoleInfo" class="org.apache.log4j.ConsoleAppender"&gt;
          &lt;layout class="org.apache.log4j.PatternLayout"&gt;
              &lt;param name="ConversionPattern" value="[%d{yyyy-MM-dd HH:mm:ss}]: %m%n" /&gt;
          &lt;/layout&gt;
      &lt;/appender&gt;
  
      &lt;category name="org.openqa.selenium"&gt;
          &lt;priority value="off" /&gt;
      &lt;/category&gt;
      &lt;category name="org.apache.log4j"&gt;
          &lt;priority value="off" /&gt;
      &lt;/category&gt;
  
      &lt;root&gt;
          &lt;level value="INFO" /&gt;
          &lt;appender-ref ref="consoleInfo" /&gt;
      &lt;/root&gt;
  
  &lt;/log4j:configuration&gt;
  </code></pre>