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 "Prasad, Kamakshya" <kp...@capitalservicing.co.jp> on 2004/09/29 08:27:20 UTC

Reloading the properties file

Hi All,

 

We have a j2ee web application using log4j for logging purpose. Nowadays
quite frequently we have to switch on and switch off the debugging
mechanism.

The properties file is in web-inf/classes.

We have to load the configuration file whenever it changes.

We are planning to write a servlet which calls the PropertyConfigurator
configureAndWatch method to reload the properties file.

But we just read through the log4j faq that this is unsafe.

Please advice me the best way to implement this reloading mechanism.

 

KP


RE: Reloading the properties file

Posted by Ivan Jouikov <iv...@ablogic.net>.
Writing a servlet to call configure and watch?

When you configure log4j using DOMConfigurator, and use configureAndWatch, it automatically reloads that file when it changes.  You don't need to invoke anything.

> -----Original Message-----
> From: Prasad, Kamakshya [mailto:kprasad@capitalservicing.co.jp]
> Sent: Tuesday, September 28, 2004 11:27 PM
> To: log4j-user@logging.apache.org
> Subject: Reloading the properties file
> 
> Hi All,
> 
> 
> 
> We have a j2ee web application using log4j for logging purpose. Nowadays
> quite frequently we have to switch on and switch off the debugging
> mechanism.
> 
> The properties file is in web-inf/classes.
> 
> We have to load the configuration file whenever it changes.
> 
> We are planning to write a servlet which calls the PropertyConfigurator
> configureAndWatch method to reload the properties file.
> 
> But we just read through the log4j faq that this is unsafe.
> 
> Please advice me the best way to implement this reloading mechanism.
> 
> 
> 
> KP
> 
> 
> ---
> Incoming mail is certified Virus Free.
> Checked by AVG anti-virus system (http://www.grisoft.com).
> Version: 6.0.766 / Virus Database: 513 - Release Date: 17.09.2004
> 

---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.766 / Virus Database: 513 - Release Date: 17.09.2004
 


---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-user-help@logging.apache.org