You can look at the code, but I believe that it would have created a new thread for every call. When the file changed, then all the threads would have been fighting with each other to update the configuration, so yes, it could have cause some degradation. Certainly not an optimal situation. In the current code base, there is no way to stop a configureAndWatch() setup beyond shutting down the vm.
Making another plug, I point you at this extension I have proposed. If you have any suggestions, I would like to hear back: I have proposed a set of extensions based on the configureAndWatch() functionality. The extensions attempt to allow more flexibility and options to specify a source for a "watchdog" that will reconfigure log4j when the source changes. Currently it supports file, url, and socket. If you have time, I would be interested to know if it solves your issue as well. You can find the related posting in the mail archives: http://marc.theaimsgroup.com/?l=log4j-user&m=101656353725142&w=2 -Mark > -----Original Message----- > From: Chaganthi, Madhusudan R. [mailto:[EMAIL PROTECTED]] > Sent: Monday, May 06, 2002 1:30 PM > To: 'Log4J Users List' > Subject: RE: Advice on Usage of PropertyConfigurator > > > Thanks for the quick reply. > > One more question related to this. > > IF I have been been calling it multiple times (I will change > it right away), > could this call have created as many threads as it has been called? > > Could that have degraded the performance? > > > > -----Original Message----- > From: Mark Womack [mailto:[EMAIL PROTECTED]] > Sent: Monday, May 06, 2002 4:26 PM > To: 'Log4J Users List' > Subject: RE: Advice on Usage of PropertyConfigurator > > > You should only call it once, in some kind of setup class. > > -Mark > > > -----Original Message----- > > From: Chaganthi, Madhusudan R. [mailto:[EMAIL PROTECTED]] > > Sent: Monday, May 06, 2002 1:13 PM > > To: '[EMAIL PROTECTED]' > > Subject: Advice on Usage of PropertyConfigurator > > > > > > Hi > > > > I have recently started using log4j 1.2b4 in our application. > > > > PropertyConfigurator.configureAndWatch(logFile,delayTime); > > > > Do I need to call this method in each class that is using log4j? > > > > I would rather call this only once in one of the startup > classes which > > thereby will reload the configuration if the file is modified. > > > > My main concern is this explanation from the javadocs. > > > > Read the configuration file configFilename if it exists. > > Moreover, "a thread > > will be created" that will periodically check if > > configFilename has been > > created or modified. The period is determined by the delay > > argument. If a > > change or file creation is detected, then configFilename is read to > > configure log4j. > > > > If I call this method in all my classes, will this thread be created > > everytime? > > > > Please advice. > > > > Regards > > Madhu > > > > > > > > Madhusudan R Chaganthi > > > Centers for Disease Control and Prevention > > > NCID/SRP/IRM (404) 498-1701 > > [EMAIL PROTECTED] > > > > In three words I can sum up everything I've learned about life: > > It Goes On. > > > > > > -- > > To unsubscribe, e-mail: > <mailto:[EMAIL PROTECTED]> > For additional commands, e-mail: <mailto:[EMAIL PROTECTED]> -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]> -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]> -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>