You are viewing a plain text version of this content. The canonical link for it is here.
Posted to log4j-dev@logging.apache.org by bu...@apache.org on 2004/05/26 09:33:28 UTC

DO NOT REPLY [Bug 29221] New: - ThrowableFilter : based on class/message matching

DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=29221>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=29221

ThrowableFilter : based on class/message matching

           Summary: ThrowableFilter : based on class/message matching
           Product: Log4j
           Version: 1.2
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: Enhancement
          Priority: Other
         Component: Other
        AssignedTo: log4j-dev@jakarta.apache.org
        ReportedBy: Toshiya_Kobayashi@sunmoretec.co.jp


This is a simple filter based on ThrowableClass matching and ThrowableMessage 
matching.

The filter admits four options "ClassToMatch", 
"MessageToMatch", "Loggable" and "AcceptOnMatch". 
If there is an exact match between the value of the "ClassToMatch"/
"MessageToMatch" option and the ThrowableInformation of the LoggingEvent,
then the decide method returns Filter.ACCEPT
in case the "AcceptOnMatch" option value is set to true, 
if it is false then Filter.DENY is returned. 
If there is no match, Filter.NEUTRAL is returned.
If "MessageToMatch" is set to null or empty, The filter doesn't evaluate 
ThrowableMessage.
So Any ThrowableMessage will be matched.
If "Loggable" is set to true, a warning message is produced by LogLog
everytime an exception dropped. This option makes sense only when 
"AcceptOnMatch" is set to false.

I wrote this when I was annoyed by java.net.SocketException "Broken pipe" in an 
environment mod_jk2 + Tomcat(JBoss).

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