[logback-dev] [Bug 52] New: Unable to use <onMatch> in logback.xml

bugzilla-daemon at pixie.qos.ch bugzilla-daemon at pixie.qos.ch
Thu Mar 8 11:27:49 CET 2007


http://bugzilla.qos.ch/show_bug.cgi?id=52

           Summary: Unable to use <onMatch> in logback.xml
           Product: logback-core
           Version: unspecified
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: major
          Priority: P1
         Component: Other
        AssignedTo: logback-dev at qos.ch
        ReportedBy: kenichi-qos at sysart.jp


With logback-0.9.2, when logback.xml contains <onMatch> or <onMismatch> tag,
the following error occurs:

ERROR in ch.qos.logback.core.joran.spi.Interpreter at 30ae41 - no applicable
action for [onMatch], current pattern is
[[configuration][appender][filter][onMatch]]
ERROR in ch.qos.logback.core.joran.spi.Interpreter at 30ae41 - no applicable
action for [onMismatch], current pattern is
[[configuration][appender][filter][onMismatch]]

Since I can specify neither <onMatch> nor <onMismatch>, I am unable to make use
of EvaluatorFilter, which is one of the reasons I'm considering to use logback
over log4j.

The cause of the problem is the two methods which have been added to
ch.qos.logback.core.filter.AbstractMatcherFilter (Revision 1380):
http://svn.qos.ch/viewvc/logback/trunk/logback-core/src/main/java/ch/qos/logback/core/filter/AbstractMatcherFilter.java?r1=1147&r2=1380

Because the return type of the getter method differs from the parameter type of
the setter method, java.beans.PropertyDescriptor for the properties (onMatch
and onMismatch) obtained in ch.qos.logback.core.util.PropertySetter contain no
writeMethod (null value, confirmed with jdb-1.6), making
PropertySetter.canContainComponent return NOT_FOUND.


-- 
Configure bugmail: http://bugzilla.qos.ch/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.



More information about the logback-dev mailing list