You are viewing a plain text version of this content. The canonical link for it is here.
Posted to log4j-user@logging.apache.org by Denis McCarthy <dm...@omnipaygroup.com> on 2002/08/28 15:32:12 UTC

Is PropertyConfigurator.configureAndWatch() expensive?

Hi there,
I'm thinking of making my log4j.properties file dynamically configurable by
using configureAndWatch() in my application
configuration. Prior to this I would like to ensure that it does not hog
system resources in any way. Can anyone confirm that using
configureAndWatch() does not lead to any appreciable system slowdown? Thanks
Denis McCarthy



--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Reading properties from config file other than log4j.properties?

Posted by Jason Rizer <ja...@yahoo.com>.
Hello,

I'm just beginning to incorporate log4j into a J2EE
Resource Adapter I'm writing.  My project already has
a configuration property file (lyConfig.properties)
from which I gather various configuration parameters
at startup.  Rather than adding log4j.properties to my
environment I'd like to add the relevent properties to
the file I already 
have. 

A couple of questions then:  First of all, is this a
good idea?  Is it what people typically do?  If so,
what is the best way to force log4j to read this file?
 My first attempt was simply to add the following to
the constructor of all objects which will instantiate
a logger:

      System.setProperty("log4j.configuration",
"lyConfig.properties");


this seems to work but it seems that it might not be
very good form to change one of the system properties
in a component running in an app server.  So, is there
any other way to accomplish this?  Sorry for rambling.

-Jason

__________________________________________________
Do You Yahoo!?
Yahoo! Finance - Get real-time stock quotes
http://finance.yahoo.com

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>