[logback-user] GEventEvaluator/JaninoEventEvaluator filter doesn't work

nagendra nagendrasingh810 at gmail.com
Fri Jun 17 11:42:16 UTC 2016


Hi,
I am trying to GEventEvaluator/JaninoEventEvaluator filter but expression is
not working...it keeps print messages even condition is false. i am using
groovy configuration. and logback 1.0.13 and janino 2.7.8. i am getting the
following error in trace.

17:04:07,255 |-ERROR in
ch.qos.logback.classic.gaffer.AppenderDelegate at 12a94400 - Appender [SELM] of
type [ch.qos.logback.core.ConsoleAppender] has no appplicable
[EvaluatorFilter] property 
17:04:07,265 |-ERROR in
ch.qos.logback.classic.gaffer.AppenderDelegate at 12a94400 - Unexpected
argument type org.codehaus.groovy.runtime.NullObject
17:04:07,265 |-ERROR in
ch.qos.logback.classic.gaffer.AppenderDelegate at 12a94400 - No 'class'
argument specified for [filter] in appender [SELM] of type
[ch.qos.logback.core.ConsoleAppender]

--------------------------------------------------------------
config file

appender("SELM", ConsoleAppender) {
  filter(EvaluatorFilter) {
    evaluator(GEventEvaluator) {
      expression = '(e.mdc?.get("job_name").contains("selm") )'
    }
    onMismatch = DENY
    onMatch = NEUTRAL
  }
  encoder(PatternLayoutEncoder) {
    pattern = "%date %-5level [${pid}-${HOSTNAME} %thread] %logger{30} -
%msg %ex{full}%n"
  }
}



More information about the logback-user mailing list