On Sep 20, 2007, at 11:37 AM, David Blevins wrote:
On Sep 20, 2007, at 9:25 AM, Karan Malhi wrote:
I think the best option is to set the system property
openejb.logger.external to true and totally control log4j
configuration from tomcat. This is what Geronimo does right now.
The openejb.logger.external property is used specifically to
configure
logging if openejb is intended to be embedded within external
containers. In my opinion that should be the standard way of doing it
regardless of whichever external software is trying to embed OpenEJB.
So, tomcat could define its own tomcat.logging.properties file which
could be used to configure logging .
Tomcat uses java.util.Logging and doesn't do any Log4j config, so
if we don't do it there'll be no logging.
Tomcat directly uses the org.apache.juli (http://tomcat.apache.org/
tomcat-6.0-doc/logging.html) for logging, which by default is hard
coded to only use java.util.Logging. For Tomcat embedded mode, I'd
like to be able to swap out our Logger implementation for one that
uses juli so all of our log messages flow into the normal Tomcat stream.
If someone has time to look at making Logging plugable, I think it
would make embedding OpenEJB into different environments cleaner.
-dain