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 sudhakardvvn <dv...@yahoo.com> on 2006/07/04 11:23:23 UTC

Log4j Configuration without use of configandwatch

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
-- 
View this message in context: http://www.nabble.com/Log4j-Configuration-without-use-of-configandwatch-tf1888905.html#a5164447
Sent from the Log4j - Users forum at Nabble.com.


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


Re: Log4j Configuration without use of configandwatch

Posted by sudhakardvvn <dv...@yahoo.com>.
Thanks
But the above method is not threadsafe. How to achieve the above without
using configandwatch() method of propertyConfiguratior
-- 
View this message in context: http://www.nabble.com/Log4j-Configuration-without-use-of-configandwatch-tf1888905.html#a5165504
Sent from the Log4j - Users forum at Nabble.com.


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


Re: Log4j Configuration without use of configandwatch

Posted by jaikiran pai <ja...@yahoo.co.in>.
>but I don't see how you could put this method in each class that instantiates a logger
   
  You dont have to put the statement in each and every class that uses a logger. Use can just invoke it once(in may be some central class of your application), thats it.


sudhakardvvn <dv...@yahoo.com> wrote:
  
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
-- 
View this message in context: http://www.nabble.com/Log4j-Configuration-without-use-of-configandwatch-tf1888905.html#a5164447
Sent from the Log4j - Users forum at Nabble.com.


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



 				
---------------------------------
 Yahoo! India Answers: Share what you know. Learn something new Click here
Catch all the FIFA World Cup 2006 action on Yahoo! India Click here