logging-log4j-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Knut Wannheden <k...@apache.org>
Subject Re: Reverting Appender interface
Date Wed, 23 Feb 2005 08:13:27 GMT
Curt Arnold <carnold <at> apache.org> writes:

> logging-log4j-tests was successful.
> 
> hivemind  
> (http://brutus.apache.org/gump/public/jakarta-hivemind/jakarta- 
> hivemind/gump_work/build_jakarta-hivemind_jakarta-hivemind.txt)  
> appeared to fail due the following check in AppenderSkeleton:
> 
>    public
>    synchronized
>    void doAppend(LoggingEvent event) {
> ..
>        if (!this.active) {
>          getNonFloodingLogger().error(
>              "Attempted to log with inactive appender named [{}].",  
> name);
>          return;
>        }
> 
> What I'm inferring from this is that the recent changes made it  
> mandatory to call activate in any client code that explicitly  
> configured AppenderSkeleton derived appenders.   I couldn't find  
> anything in the framework that would trigger a call to activate on  
> adding an Appender to a repository (especially since that method  
> doesn't exist on Appender anymore).
> 
> I haven't looked at the Hivemind code, but I assumed that it  
> implemented an appender without using AppenderSkeleton since the  
> interface change broke it, but this problem suggests that they have an  
> appender that did extend AppenderSkeleton.  Maybe they have one of  
> each, or maybe my analysis was off.
> 

The HiveMind appender implementation in question does subclass AppenderSkeleton 
(ViewCVS: http://tinyurl.com/4w83k).

I was wondering if the issue could be resolved if the HiveMind appender would 
declare an isActive() method and the check above in AppenderSkeleton would use 
this method instead of checking the field.  Or alternatively we could make sure 
the HiveMind appender gets activated by calling the activateOptions() method. 
Just an idea.

Cheers,

--knut


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


Mime
View raw message