logging-log4j-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Tom Eugelink <t...@tbee.org>
Subject Re: automatic reload
Date Tue, 11 Nov 2003 18:44:57 GMT
Hey Mark,

Well, I could always try to make time (time suddenly is a rare commodity 
once you furthered yourself in the human genepool, at least for the next 
6 years or so).

What I see as a problem is not so much the automatic starting of a 
thread, but when to stop it. In a stand alone application this is not 
such a problem, but in a container, where you have a separate 
configuration for each context (webapp0, I can't imagine where to hook 
that in, in a generic fashion. Starting could be done in the static 
constructor of a class, which is loaded by the classloader of the 
context, but AFAIK there is no static destructor.

How does the plugin logic start and stop plugins?

Tom



Mark Womack wrote:

> Tom,
> 
> In v1.3 Watchdogs will be a subclass of Plugin.  Plugins are new to v1.3 and
> configurable from (at least xml) configuration files.  So, you'll be able to
> define watchdogs in the configuration files.  Plugins have some code to not
> stop/recreate running plugins during reconfiguration, so eventually if a
> watchdog is watching the configuration file that defines it, it will be
> maintained across reconfigurations, etc.  Still working out some of those
> details.  Actually the Watchdog code I released way-back-when still needs to
> be checked into cvs and worked into the plugin infrastructure.
> 
> If you have any comments, ideas, or time to review (once I get it checked
> in) I'd love to hear them.
> 
> thanks,
> -Mark
> 
> 
>>-----Original Message-----
>>From: Tom Eugelink [mailto:tbee@tbee.org]
>>Sent: Tuesday, November 11, 2003 6:06 AM
>>To: Log4J Users List
>>Subject: Re: automatic reload
>>
>>
>>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
>>
> 
> 
> ---------------------------------------------------------------------
> 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


Mime
View raw message