Details
-
Bug
-
Resolution: Fixed
-
Major
-
0.9.14
-
None
Description
The release note for 0.9.14 states: "In addition, EvaluatorAction has been modified to accept evaluators of any type and not just instances of JaninoEvaluator."
Firstly: I could not found this documented within the manual.
Secondly:
The examples for evaluator filters within appenders from the manual do no longer work, e.g. logback-examples/src/main/java/chapter6/basicEventEvaluator.xml:
<appender name="STDOUT"
class="ch.qos.logback.core.ConsoleAppender">
<filter class="ch.qos.logback.core.filter.EvaluatorFilter">
<evaluator name="myEval">
<expression>message.contains("billing")</expression>
</evaluator>
<OnMismatch>NEUTRAL</OnMismatch>
<OnMatch>DENY</OnMatch>
</filter>
<layout class="ch.qos.logback.classic.PatternLayout">
<pattern>
%-4relative [%thread] %-5level %logger - %msg%n
</pattern>
</layout>
</appender>
The error message is: |-ERROR in ch.qos.logback.core.joran.action.NestedComplexPropertyIA - No class name attribute in [evaluator]
After adding class="ch.qos.logback.classic.boolex.JaninoEventEvaluator" to the evaluator tag it works. But this should not be required.