logging-log4j-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mark Womack <mwom...@bevocal.com>
Subject RE: Receiver Implementation
Date Tue, 06 Aug 2002 17:15:11 GMT
I need to sit down with some code in front of me to better evaluate, but I
like your simplification of the space.  I am now wondering if the proposed
Watchdog stuff could just be another specialized "plugin" since all it does
is reconfigure the logger repository when it detects a changed config
source.  Grouping these and future extensions into a single "plugin"
repository has merit.

Hm.  Let me think.

-Mark

> -----Original Message-----
> From: Nicko Cadell [mailto:nicko@Neoworks.com]
> Sent: Tuesday, August 06, 2002 3:00 AM
> To: 'log4j-dev@jakarta.apache.org'
> Subject: RE: Receiver Implementation
> 
> 
> I like your idea for a Receiver. I have some comments to make 
> about the
> suggested implementation.
> 
> First of all the Receiver uses the framework, the framework 
> does not need to
> know about the Receiver. This is unlike the Appenders etc. 
> etc. which are
> used directly by the framework.
> 
> The aim of the receiver is to load some arbitrary code 
> specified in the
> config file, and bind it to the LoggerRepository. The 
> LoggerRepository and
> the rest of log4j does not need to know that it is a receiver.
> 
> I have removed the doPost() method form the interface as this 
> should just be
> a helper method on the ReceiverSkeleton and should not be 
> exposed through
> the interface.
> 
> This is the base interface that this all boils down to:
> 
> public interface Plugin implements OptionHandler {
>   public String getName();
>   public void setName(String _name);
> 
>   public LoggerRepository getLoggerRepository();
>   public void setLoggerRepository(LoggerRepository _repository);
> 
>   public void shutdown();
> }
> 
> Note that this is now the Plugin interface as it has no 
> receiver specific
> functionality. Obviously trivial implementations of PluginSkeleton and
> ReceiverSkeleton would be needed (ReceiverSkeleton adds back 
> the doPost()
> method.
> 
> A Plugin is a class that uses the LoggerRepository to do 
> something. The
> class is initialised by calling the OptionHandler method and 
> is shutdown()
> when the LoggerRepository is shutdown. The advantage of a 
> plugin aproach is
> that it is not limited to receivers, I'm sure that we will 
> think of some
> other plugins that can be written.
> 
> Any thoughts?
> Nicko
> 
> --
> To unsubscribe, e-mail:   
<mailto:log4j-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:log4j-dev-help@jakarta.apache.org>

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


Mime
View raw message