I cannot find the config error in this XML of Lo4jJ:
<?xml version="1.0" encoding="UTF-8"?>
<Configuration status="WARN">
<Appenders>
<Console name="console-log" target="SYSTEM_OUT" >
<PatternLayout pattern="[%-5level] %d{yyyy-MM-dd HH:mm:ss.SSS} [%t] %c - %msg%n" />
</Console>
<RollingFile name="file-log" fileName="app.log" filePattern="app.%i.log">
<PatternLayout>
<pattern>[%-5level] %d{yyyy-MM-dd HH:mm:ss.SSS} [%t] %c{1} - %msg%n</pattern>
</PatternLayout>
<Policies>
<SizeBasedTriggeringPolicy size="10MB" />
</Policies>
<DefaultRolloverStrategy max="5"/>
</RollingFile>
</Appenders>
<Loggers>
<Root level="warn">
<AppenderRef ref="console-log" />
<AppenderRef ref="file-log" />
</Root>
<logger name="org.apache.axis" value="debug" />
<Logger name="com.myapp" level="debug"/>
</Loggers>
</Configuration>
I expect to log all org.apache.axis messages with debug level. But I can see only debug from com.myapp.
I tried to set <Root level="debug"> and between billions of messages I can see axis logs... so I'm sure that package is logging.
I'm using Log4J 2.16.0 in a tomcat container Java 1.8