Yes. Your links are very valuable for setups where the configuration exists outside the container. They just aren't what I am looking for at this moment.
For the record, I also tried to set the log4j2.xml file in the META-INF directory of the EJB JAR. That didn't work either. That would have been a good backup if I couldn't have used the EAR root. In any event, I'm sorry I couldn't succeed to help others how to do it too. It's something I will continue to investigate in my spare time. Cheers, Paul On Mon, Nov 3, 2014 at 7:24 PM, Ralph Goers <[email protected]> wrote: > 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 <[email protected]> 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 <[email protected]> > > wrote: > > > >> This looks to be somewhat JBoss specific. > >> > >> Ralph > >> > >>> On Nov 3, 2014, at 2:52 PM, Gary Gregory <[email protected]> > wrote: > >>> > >>> Sound like we need a doc page for this set up! Wow. > >>> > >>> Gary > >>> > >>> <div>-------- Original message --------</div><div>From: Paul Benedict < > >> [email protected]> </div><div>Date:11/03/2014 16:38 (GMT-05:00) > >> </div><div>To: Log4J Users List <[email protected]> > >> </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: [email protected] > >> For additional commands, e-mail: [email protected] > >> > >> > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [email protected] > For additional commands, e-mail: [email protected] > >
