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]>