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

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@qos.ch ReportedBy: kenichi-qos@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@30ae41 - no applicable action for [onMatch], current pattern is [[configuration][appender][filter][onMatch]] ERROR in ch.qos.logback.core.joran.spi.Interpreter@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/log... 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.

http://bugzilla.qos.ch/show_bug.cgi?id=52 noreply.sebastien@qos.ch changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |ASSIGNED ------- Comment #1 from noreply.sebastien@qos.ch 2007-03-08 11:38 ------- Hello, Thanks for the report, I'm going to check that immediately. -- 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.

http://bugzilla.qos.ch/show_bug.cgi?id=52 ------- Comment #2 from noreply.sebastien@qos.ch 2007-03-08 16:33 ------- On going work on this bug. Dev-notes follow. I've committed a test case that checks two things: 1. Does the PropertySetter work with FilterReply enums? 2. Does it work with any enum? So far, I've modified AbstractMatcherFilter and the PropertySetter in a way that we only need the usual setter, that takes a FitlerReply object and the AbstractMatcherFilter will be set correctly. So case 1 works, and filters should be working fine. For case 2, it might be more complicated, since we don't know in advance what kind of enum we are dealing with. Should we give a YAGNI-type answer to this second case? -- 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.

http://bugzilla.qos.ch/show_bug.cgi?id=52 noreply.ceki@qos.ch changed: What |Removed |Added ---------------------------------------------------------------------------- Status|ASSIGNED |RESOLVED Resolution| |FIXED ------- Comment #3 from noreply.ceki@qos.ch 2008-03-19 21:42 ------- Sebastien has fixed this bug in revision 1415 dated March 8th 2007. He has also provided a test case. I have also added new test case of my own. Moreover, PropertySetter can now deal with any enum type, not just FilterReply. See also: http://svn.qos.ch/viewvc?view=rev&revision=1415 http://svn.qos.ch/viewvc?view=rev&revision=1651 -- 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.
participants (1)
-
bugzilla-daemon@pixie.qos.ch