Since few weeks TomEE has some support for log4j2 without using log4j2-log4j compatibility module.
To set it up just add the log4j2 jars you want to tomee (lib/) and add your config – log4j2.xml – in the classloader (lib/ works too).
Side note: you can do it using a conf/jars.txt file and using log4j2 maven coordinates, really more easy ;).
Then in conf/system.properties (or in CATALINA_OPTS) set the system property openejb.log.factory to log4j2:
Then you’ll get the container logs redirected to log4j2.