Log4j config without configandwatch
1 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Anonymous
Posted On:   Tuesday, July 4, 2006 04:31 AM

I am trying to figure out if there is a way to reload the properties file anytime it changes without restarting the system. One of our requirements is that the properties file can be changed and the logging will automatically change without restarting the system. I know you can use the PropertyConfigurator's configureAndWatch method, but I don't see how you could put this method in each class that instantiates a logger. It seems like way too much overhead. If anyone knows of a way to do this, I would appreciate it

Re: Log4j config without configandwatch

Posted By:   Anonymous  
Posted On:   Wednesday, July 5, 2006 06:27 AM


Read Lo4j API ..
org.apache.log4j.PropertyConfigurator.configureAndWatch(String file, long time);

;)
About | Sitemap | Contact