logging-log4j-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Sumit Kumar" <sum...@novell.com>
Subject clarification about AndFilter ....
Date Tue, 26 Apr 2005 06:47:59 GMT
Hi All,

It's really good to see AndFilter in 1.3. It will help me really a
lot. Here I need some clarification about AndFilter (and some general
queries).

(Forgive me if I am wrong somewhere)

1. Why AndFilter checks for every added filter in the list when the
earlier one returns false.
(Code is:-
boolean accepted = true;    	
while (f != null) {
      accepted = accepted && (Filter.ACCEPT == f.decide(event));
      f = f.getNext();
}

I felt it should be 
boolean accepted = true;    	
while (accepted && f != null) {
      accepted = accepted && (Filter.ACCEPT == f.decide(event));
      f = f.getNext();
}
)

2. Why it returns neutral when the accepted is false.
(Code is
if(accepted) {
      if(acceptOnMatch) {
        return Filter.ACCEPT;
      }
       return Filter.DENY;
}
return Filter.NEUTRAL;

I felt it should be 
if(accepted) {
      if(acceptOnMatch) {
        return Filter.ACCEPT;
      }
       return Filter.DENY;
}
return Filter.DENY;

(I thought NEUTRAL should be in that case when I added an OR filter
(and not AndFiler)).

(3) Is there any ORFilter or any plan for that ?

(4) I am very curious to use 1.3 (it has some of the feature I needed
!!!). when is the stable release expected ?
(sorry to ask that if it is too early to ask.)

I feel there might be some rationale behind (2), but doesn't understand
that. For me, (1) is a coding error.

Waiting for reply ... :-w

cheers ....
Sumit

---------------------------------------------------------------------
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