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 Tom Eugelink <tb...@tbee.org> on 2003/11/09 13:52:15 UTC

automatic reload

I know there is a parameter which can be used to specifiy that log4j 
must reload a configuration file (checking every so often). But I prefer 
autoconfiguration. AFAIK it is not possible to set autoreload from a 
configuration file, correct?

Tom



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


Re: automatic reload

Posted by Tom Eugelink <tb...@tbee.org>.
I see (took a look at the sources that were included in the older mail).

Basically he has rewritten the "AndWatch" part, expanding it into a 
semi-framework, and adding a method to stop the thread ("stopWatching").

Basically one could write a servlet that starts a watchdog upon load and 
stops it upon finalize. It still isn't done totally external of the 
application via configuration, but I can see how that can be a problem.

I'll ponder a bit more. Thank you!

Tom



Jacob Kjome wrote:

> 
> look at configureAndWatch() in the configurators.
> 
> However, I wouldn't use this in a container as the thread will run until 
> the JVM is shut down.  There is no manual way to stop it.
> 
> Look for Mark Womack's watchdogs in the next version of Log4j for a 
> better solution.  Here's an old message with some actual code showing 
> how it works.  Check the latest CVS, though, as things have probably 
> changed...
> http://marc.theaimsgroup.com/?l=log4j-user&m=101656353725142&w=2
> 
> Jake
> 
> At 01:52 PM 11/9/2003 +0100, you wrote:
> 
>> I know there is a parameter which can be used to specifiy that log4j 
>> must reload a configuration file (checking every so often). But I 
>> prefer autoconfiguration. AFAIK it is not possible to set autoreload 
>> from a configuration file, correct?
>>
>> Tom
>>
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: log4j-user-unsubscribe@jakarta.apache.org
>> For additional commands, e-mail: log4j-user-help@jakarta.apache.org
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: log4j-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: log4j-user-help@jakarta.apache.org
> 
> 


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


Re: automatic reload

Posted by Jacob Kjome <ho...@visi.com>.
look at configureAndWatch() in the configurators.

However, I wouldn't use this in a container as the thread will run until 
the JVM is shut down.  There is no manual way to stop it.

Look for Mark Womack's watchdogs in the next version of Log4j for a better 
solution.  Here's an old message with some actual code showing how it 
works.  Check the latest CVS, though, as things have probably changed...
http://marc.theaimsgroup.com/?l=log4j-user&m=101656353725142&w=2

Jake

At 01:52 PM 11/9/2003 +0100, you wrote:
>I know there is a parameter which can be used to specifiy that log4j must 
>reload a configuration file (checking every so often). But I prefer 
>autoconfiguration. AFAIK it is not possible to set autoreload from a 
>configuration file, correct?
>
>Tom
>
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: log4j-user-unsubscribe@jakarta.apache.org
>For additional commands, e-mail: log4j-user-help@jakarta.apache.org


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