That was a valuable hint, Romain! Indeed, I got it to work. In system.properties I commented out:
#java.util.logging.manager = java.util.logging.LogManager and added: openejb.log.factory=log4j with all above changes from original post. And now, when I run my ear with OpenEJB server by clicking "Run" in the Server view, I get log4j logging! Thanks On Wed, Apr 1, 2015 at 10:13 AM, Romain Manni-Bucau <[email protected]> wrote: > Hi > > did you try putting these system properties on conf/system.properties? > > > Romain Manni-Bucau > @rmannibucau <https://twitter.com/rmannibucau> | Blog > <http://rmannibucau.wordpress.com> | Github < > https://github.com/rmannibucau> | > LinkedIn <https://www.linkedin.com/in/rmannibucau> | Tomitriber > <http://www.tomitribe.com> > > 2015-04-01 8:48 GMT+02:00 Adam X <[email protected]>: > > > Hi, > > > > I'm having problem configuring Eclipse OpenEJB plugin to use log4j > logging > > rather than JDK logging OpenEJB ships with. I was able to configure stand > > alone OpenEJB to use log4j by adding the following to openejb startup > > script: > > > > -Dopenejb.log.factory=log4j" > > "-Dlog4j.configuration=$OPENEJB_HOME/conf/log4j.properties > > > > and making the following JAR changes in the lib directory: > > > > -- removed -- > > slf4j-api-1.7.7.jar > > slf4j-jdk14-1.7.7.jar > > > > -- replaced with -- > > slf4j-api-1.6.1.jar > > slf4j-log4j12-1.6.1.jar > > log4j-1.2.16.jar > > > > Furthermore, in Eclipse server configuration, when I edit launch > > configuration for my EAR and add -Dopenejb.log.factory and > > -Dlog4j.configuration it does use log4j logging, however, that > > configuration is instantly overriden by original plugin setup and on > > subsequent invocations my changes are gone and therefore reverting back > to > > JDK logging. > > > > I am certain log4j / OpenEJB is a common configuration and I am missing > > something. Could anybody help to point me out what I may be missing? > > > > Thanks > > Adam > > >
