With log4j2.xml (and .dtd) in the ear's META-INF, nothing. Renamed to log4j.xml, nothing. Moved both to root of ear, nothing.
Has no one tested this yet? I can find no real documentation on doing this.
I restored my EJB module that has nothing but the config files and I see where it is deployed. BUT, log4j doesn't start until the war module is started.
Adding log4j-web to the WAR module's WEB-INF/lib folder sorta of works but only once the servlet context is started.
So I added a @Singleton/@Startup EJB to the config-log module of the ear. In the @PostConstruct method, it starts up log4j;
BUT that method is NOT called until the startup of the WAR!
HOW IS THAT POSSIBLE?!
Since when is the lifecycle of a WAR module controlling the life cycle of an EJB in a different deployment?!
This is idiotic. I do not understand by log4j2 doesn't auto-start on its own from each module, but I guess there's no standard/spec for that?
Even with the log4j2 api, core, and slf4j jars in the EAR/lib.