Did you look at the links I sent in the prior email? It had a couple of options on where to put the log4j2.xml. But yes, META-INF does not look to be a standard location unless you modify the deployment descriptor.
Ralph > On Nov 3, 2014, at 3:09 PM, Paul Benedict <pbened...@apache.org> wrote: > > Well..... I don't know if there is a solution for me. I found a note on the > JBoss forums saying the <Ear>/META-INF folder is not visible to its > children [1]. Consequently, I must conclude that it's currently not > possible to put the configuration on the EAR level with v2. I really wanted > this feature like v1, but I think it only works with v1 because JBoss > provides custom support for it (just my guess). They are still researching > v2 integration [2] so let's hope for the best. > > [1] http://lists.jboss.org/pipermail/wildfly-dev/2014-June/002262.html > [2] https://issues.jboss.org/browse/WFLY-1037 > > Cheers, > Paul > > On Mon, Nov 3, 2014 at 3:56 PM, Ralph Goers <ralph.go...@dslextreme.com> > wrote: > >> This looks to be somewhat JBoss specific. >> >> Ralph >> >>> On Nov 3, 2014, at 2:52 PM, Gary Gregory <garydgreg...@gmail.com> wrote: >>> >>> Sound like we need a doc page for this set up! Wow. >>> >>> Gary >>> >>> <div>-------- Original message --------</div><div>From: Paul Benedict < >> pbened...@apache.org> </div><div>Date:11/03/2014 16:38 (GMT-05:00) >> </div><div>To: Log4J Users List <log4j-user@logging.apache.org> >> </div><div>Subject: Re: log4j2.xml in EAR </div><div> >>> </div>Well I have the classes loading now. I still can't find my >> log4j2.xml but >>> at least the "api" and "core" libraries are being exposed to my >> application. >>> >>> Okay, so to test this, make sure your "api" and "core" libraries are set >> to >>> "provided" scope in Maven. You don't want them already bundled; we want >> to >>> use the single copy installed in Wildfly. >>> >>> My module file looks like this: >>> <?xml version="1.0" encoding="UTF-8"?> >>> <module xmlns="urn:jboss:module:1.3" name="org.apache.log4j2"> >>> <resources> >>> <resource-root path="log4j-api-2.1.jar"/> >>> <resource-root path="log4j-core-2.1.jar"/> >>> </resources> >>> <dependencies> >>> <module name="javaee.api" /> >>> </dependencies> >>> </module> >>> >>> It seems "core" is dependent upon JMX and other EE APIs; so I had to >>> include a dependency. We can probably figure out which EE modules are >>> really needed (and slim down), but I don't have the time to prune -- so I >>> included everything EE. >>> >>> Next was my jboss-deployment-structure.xml. I have to export the log4j >>> libraries so my EJB modules can see them: >>> >>> <jboss-deployment-structure xmlns="urn:jboss:deployment-structure:1.0"> >>> <deployment> >>> <dependencies> >>> <module name="org.apache.log4j2" export="true" /> >>> </module> >>> </dependencies> >>> </deployment> >>> </jboss-deployment-structure> >>> >>> This is where my JBoss/Wildfly knowledge fails me. I don't know why I >> need >>> export="true" but I do. >>> >>> So the only thing left now is to find the log4j2.xml file. Stay tuned. >>> >>> Cheers, >>> Paul >> >> >> --------------------------------------------------------------------- >> To unsubscribe, e-mail: log4j-user-unsubscr...@logging.apache.org >> For additional commands, e-mail: log4j-user-h...@logging.apache.org >> >> --------------------------------------------------------------------- To unsubscribe, e-mail: log4j-user-unsubscr...@logging.apache.org For additional commands, e-mail: log4j-user-h...@logging.apache.org