Log4J2 will look for a config file named log4j2.xml
in the classpath. If it cannot find this file it will try a few alternatives (see the configuration manual page), but log4j.xml
is not recognized by default. (It is possible to tell log4j2 to take some specified file as the config: http://logging.apache.org/log4j/2.x/faq.html#config_location )
If no config file is found, a default configuration is installed that will log ERROR and higher events to StdErr.
I suspect this is what is happening. The simplest way to remedy this is to rename your config file log4j2.xml
and place it in the classpath. You can then enable log4j2 internal logging by specifying <Configuration status="trace">
to further troubleshoot if necessary.