DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT <http://nagoya.apache.org/bugzilla/show_bug.cgi?id=24803>. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND INSERTED IN THE BUG DATABASE.
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=24803 LevelMatchFilter not working as expected ------- Additional Comments From [EMAIL PROTECTED] 2003-11-19 16:40 ------- Argh, I'm getting conflicting information now that I'm digging deeper in this issue. I've been reviewing chapter 6 of Ceki's Log4J book and it clearly states that messages are only to be DENY if they match and acceptOnMatch is false. If it is set to true then ACCEPT is return. So if there's no match then NEUTRAL is returned. Quoting his book: [page 143, example with a StringMatchFilter followed by LevelMatchFilter] "Contrary to the previous filter chain, instead of denying events on match, this chain accepts events when a match occurs. This filter chain is incorporated in the configuration script filter2.xml. Applying it to the chapter6.Sample1 application you should notice that NOT ONLY ARE THE DESIGNATED EVENTS ALLOWED TO PASS THROUGH, BUT SO ARE ALL OTHER EVENTS. Indeed, the filter chain in Example 6-2 is incomplete because it lets certain events pass through but does not specify the events to block. AT THE END OF THE CHAIN, EVENTS THAT HAVE BEEN NEITHER REJECTED NOR ACCEPTED ARE PROCESS NORMALLY - THEY ARE IMPLICITLY ACCEPTED. The following filter chain accepts events containing the string "teacher" as well as all events of level INFO. However, it denies all other events not matching these two criteria." In order to filter out those that don't match, we need to add a DenyAllFilter at the end so that if an event is is NEUTRAL when it reaches the end, it is filtered out. Ok, so if I understand how filter really works this time... could it be that I'm getting confused by the way LevelRangeFilter works? It denies if level is out of range and returns accept if it matches and acceptOnMatch is true, else returns NEUTRAL? This is the opposite logic of all the other filters I've looked at now. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]