Uploaded image for project: 'logback'
  1. logback
  2. LOGBACK-335

Accidental incompatible joran syntax for evaluator filters

    XMLWordPrintable

Details

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Major Major
    • 0.9.15
    • 0.9.14
    • logback-classic
    • 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.

      Attachments

        Activity

          People

            ceki Ceki Gülcü
            mfranz@intershop.de Michael Franz
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: