[Bug 17] New: c.q.l.c.filter.EvaluatorFilter should not barf with NPE

http://bugzilla.qos.ch/show_bug.cgi?id=17 Summary: c.q.l.c.filter.EvaluatorFilter should not barf with NPE Product: logback-classic Version: unspecified Platform: PC OS/Version: Windows Status: NEW Severity: critical Priority: P1 Component: Other AssignedTo: logback-dev@qos.ch ReportedBy: ceki@qos.ch In case the evaluator could not be set for c.q.l.c.filter.EvaluatorFilter, it should NOT barf with a NPE. LOGBACK: No context given for ch.qos.logback.core.util.PropertySetter@176c74b |-INFO in ch.qos.logback.classic.joran.action.ConfigurationAction - Ignoring debug attribute. |-INFO in ch.qos.logback.core.joran.action.AppenderAction - About to instantiate appender of type [ch.qos.logback.core.ConsoleAppender] |-INFO in ch.qos.logback.core.joran.action.AppenderAction - Naming appender as [STDOUT] |-ERROR in ch.qos.logback.core.filter.EvaluatorFilter@e5855a - No evaluator set for filter myFilter |-INFO in ch.qos.logback.core.joran.action.AppenderAction - Popping appender named [STDOUT] from the object stack |-INFO in ch.qos.logback.classic.joran.action.LevelAction - root level set to DEBUG |-INFO in ch.qos.logback.core.joran.action.AppenderRefAction - Attaching appender named [STDOUT to Logger[root] Exception in thread "main" java.lang.NullPointerException at ch.qos.logback.core.filter.EvaluatorFilter.decide(EvaluatorFilter.java:34) at ch.qos.logback.core.spi.FilterAttachableImpl.getFilterChainDecision(FilterAttachableImpl.java:68) at ch.qos.logback.core.AppenderBase.getFilterChainDecision(AppenderBase.java:115) at ch.qos.logback.core.AppenderBase.doAppend(AppenderBase.java:65) at ch.qos.logback.core.spi.AppenderAttachableImpl.appendLoopOnAppenders(AppenderAttachableImpl.java:51) at ch.qos.logback.classic.Logger.appendLoopOnAppenders(Logger.java:286) at ch.qos.logback.classic.Logger.callAppenders(Logger.java:270) at ch.qos.logback.classic.Logger.filterAndLog(Logger.java:375) at ch.qos.logback.classic.Logger.debug(Logger.java:398) at chapter5.GoMDC.main(GoMDC.java:28) Config file: <configuration> <appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender"> <layout class="ch.qos.logback.classic.PatternLayout"> <param name="Pattern" value="%-4relative [%thread] %-5level %X{testKey} - %msg%n" /> </layout> <filter class="ch.qos.logback.core.filter.EvaluatorFilter"> <Name>myFilter</Name> <Evaluator class="ch.qos.logback.classic.boolex.JaninoEventEvaluator"> <Expression>"k".equals(mdc.get("k"))</Expression> </Evaluator> </filter> </appender> public class EvaluatorFilter <root> <level value="debug" /> <appender-ref ref="STDOUT" /> </root> </configuration> -- 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=17 noreply.sebastien@qos.ch changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution| |FIXED ------- Comment #1 from noreply.sebastien@qos.ch 2006-10-26 17:01 ------- ok -- 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=17 noreply.sebastien@qos.ch changed: What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |CLOSED -- 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