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.
Is there a way I can print console logs also to the file I specified in log4j2.xml?
<?xml version="1.0" encoding="UTF-8"?>
<configuration status="all">
<appenders>
<Console name="STDOUT">
<PatternLayout pattern="<%X{UOWID}> [%t] %d{yyyy/MMM/dd HH:mm:ss} %-5p [%c{1}] %m%n"/>
</Console>
<RollingFile name="fileAppender" fileName="${sys:catalina.base}/logs/omp-web-services.log" filePattern="${sys:catalina.base}/logs/omp-web-services.log">
<PatternLayout pattern="<%X{UOWID}> [%t] %d{yyyy/MMM/dd HH:mm:ss} %-5p [%c{1}] %m%n" />
<Policies>
<SizeBasedTriggeringPolicy size="250 MB"/>
</Policies>
</RollingFile>
</appenders>
<loggers>
<root level="INFO">
<appenderRef ref="STDOUT" level="info"/>
<appenderRef ref="fileAppender" level="info"/>
</root>
</loggers>