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 . In my opinion, we should remove the hack from the Logger.
WDYT? On 9/19/07, David Blevins <[EMAIL PROTECTED]> wrote: > Before the rewrite the we used to scrape the logging properties for > file references, resolve them relative to openejb.base (i.e. new File > (base, path)) and update the path with the resolved path. > > http://fisheye6.cenqua.com/browse/openejb/branches/3.0/container/ > openejb-core/src/main/java/org/apache/openejb/util/Logger.java? > r=546343#l734 > > We'd also check if the resolved path pointed to a directory where a > log file could actually be created, if not then we'd assume the > logging configuration was no good, install the fallback approach > instead, then log which paths were invalid. > > -David > > On Sep 18, 2007, at 11:08 PM, Dain Sundstrom wrote: > > > IIRC in standalone we set user.dir to openejb.base. > > > > -dain > > > > On Sep 18, 2007, at 10:03 PM, Karan Malhi wrote: > > > >> Hmm.. > >> > >> Looks like PropertyConfigurator is unable to find/resolve the system > >> property openejb.base and it is defaulting the log file to > >> ${user.dir}/logs/ . Are there different classloaders for tomcat and > >> openejb? I dont think different classloaders should have any > >> affect on > >> how a system property is resolved, but just curious. > >> > >> On 9/19/07, Dain Sundstrom <[EMAIL PROTECTED]> wrote: > >>> On Sep 18, 2007, at 9:25 PM, Karan Malhi wrote: > >>> > >>>> Dain, > >>>> > >>>> My guess is that you might have already figured out the below and I > >>>> might be missing something here. However, just want to jot down the > >>>> behaviour of the Logger, maybe you might find some easier option > >>>> than > >>>> the hack ;) > >>>> > >>>> logging.properties does not refer to a ${openejb.home} or > >>>> ${openejb.base}. So, I am not sure how you are replacing it and > >>>> getting it to work. Maybe I am missing something. > >>> > >>> I forgot to mention, I also updated the logging properties so the > >>> files names are relative to ${openejb.base} > >>> > >>> -dain > >>> > >> > >> > >> -- > >> Karan Singh Malhi > > > > > > -- Karan Singh Malhi
