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]
