Description
On the log4j-user mailing list, Peter DePasquale gave this test case that demonstrates the problem:
Note that the configuration has no root logger, but only contains a named logger.
In a debugger I found that the LoggerConfig for "logtest.LogTest" ended up with an empty "appenders" Map<String, AppenderControl<?>>. The appenderRefs list did contain an AppenderRef object but in #callAppenders there are no AppenderControl objects to call...
(Sorry, I have been unable to find out the underlying cause yet.)
<?xml version="1.0" encoding="UTF-8"?>
<configuration status="warn">
<appenders>
<File name="tracelog" fileName="trace-log.txt"
immediateFlush="true" append="false">
<PatternLayout pattern="%d
[%t] %-5level %logger
{36} - %msg%n"/>
</File>
</appenders>
<loggers>
<logger name="logtest.LogTest" level="trace">
<appender-ref ref="tracelog"/>
</logger>
</loggers>
</configuration>
package logtest;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
import org.apache.logging.log4j.core.config.XMLConfigurationFactory;
public class LogTest {
public static void main(String[] args)
}