logging-log4j-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Paul Smith <Paul.Sm...@lawlex.com.au>
Subject RE: WatchDog & Plugins
Date Tue, 22 Apr 2003 04:28:31 GMT
> My thinking right now is to create a base Watchdog class 
> based on Plugin,
> similar to how it is done right now for Receiver.  Then, 
> build on top of
> that base class in a fashion similar to the what is discussed 
> above.  The
> end result will be a set of classes that support watching a 
> file, an http
> url, or a socket.  And hopefully some useful base classes 
> that can be used
> by developers to develop versions to watch other sources as well.

Reading the posts, and reviewing the current watchdog concept posed a few
questions in my mind that I should get straight before I can really be of
any use in this area.  

My main question comes from the use of LoggerRepository's, and specifically,
why there would be any need for more than the default LoggerRepository that
is instantiated as part of the above process.  I agree allowing more than
one is nice and neat, allowing Logger separation, but I can't think of a
concrete scenario of where it might be needed or even useful. This could
just be my limited scope of use of Log4J so far. Together with this is an
implied thought that a LoggerRepository may have it's own Watchdog?  Did I
misread something?

Watchdog as a plugin isn't sitting with me as neatly just yet as I would
like; seems more complicated than it needs to be. It seems unnatural for me
to specify a Watchdog plugin in an XML file that points to a configuration
source anything other than the configuration file the plugin was defined in
(Perhaps that's just from not needing anything more complicated than a
single config file).  

Having said that however, it does pose an interesting 'bootstrap' scenario,
where the current Property/DOMConfigurators could get added as specific
Watchdog Plugin's to the default LoggerRepository, which effectively
'monitor' a found file (if found) once and once only, unless the
configuration file contains additional Watchdog plugins that point
themselves to the current configuration file.  Is this where you're going?

The other thing that has me in circles, is that the Configurator loads a
configuration, which defines a Watchdog, which wraps a Configurator, which
could reconfigure everything, which seems to mean that another Watchdog gets
created, which wraps a Configurator...etc etc etc.  

Paul Smith

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


Mime
View raw message