title: Can I print the console logs to specific file in Log4j 2?
body: <p>I'm migrating from log4j 1.2 to log4j 2.0. Earlier all my console logs and logs were printed in specific log files. But after migrating, Console logs are printed in tomcat7-stderr.logs and other logs are printed in specific log file.</p>
  
  <p>Is there a way I can print console logs also to the file I specified in log4j2.xml?</p>
  
  <pre class="lang-xml prettyprint-override"><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
  &lt;configuration status="all"&gt;
  &lt;appenders&gt;
      &lt;Console name="STDOUT"&gt;
          &lt;PatternLayout pattern="&amp;lt;%X{UOWID}&amp;gt; [%t] %d{yyyy/MMM/dd HH:mm:ss} %-5p [%c{1}] %m%n"/&gt;
      &lt;/Console&gt;
      &lt;RollingFile name="fileAppender" fileName="${sys:catalina.base}/logs/omp-web-services.log" filePattern="${sys:catalina.base}/logs/omp-web-services.log"&gt;
          &lt;PatternLayout pattern="&amp;lt;%X{UOWID}&amp;gt; [%t] %d{yyyy/MMM/dd HH:mm:ss} %-5p [%c{1}] %m%n" /&gt;
          &lt;Policies&gt;
              &lt;SizeBasedTriggeringPolicy size="250 MB"/&gt;
          &lt;/Policies&gt;
      &lt;/RollingFile&gt;
  &lt;/appenders&gt;
  &lt;loggers&gt;
      &lt;root level="INFO"&gt;
          &lt;appenderRef ref="STDOUT" level="info"/&gt;
          &lt;appenderRef ref="fileAppender" level="info"/&gt;
      &lt;/root&gt;
  &lt;/loggers&gt;
  </code></pre>
  
  <p></p>