1
2
3
4
5
6
7
8
9
10
11
12
13
14
15 package ch.qos.logback.classic.boolex;
16
17 import ch.qos.logback.classic.spi.ILoggingEvent;
18 import ch.qos.logback.core.boolex.EvaluationException;
19 import ch.qos.logback.core.boolex.EventEvaluatorBase;
20 import ch.qos.logback.core.boolex.Matcher;
21
22 import java.util.ArrayList;
23 import java.util.List;
24
25 public class StubEventEvaluator extends EventEvaluatorBase<ILoggingEvent> {
26
27 static public final String MSG_0 = "This class is a stub for JaninoEventEvaluator which was removed in logback version 1.5.13";
28 static public final String MSG_1 = "You can migrate existing configurations to Java-only equivalents with the \"Janino Expression migrator\" tool at:";
29 static public final String MSG_2 ="https://logback.qos.ch/translator/services/janinoExpressionMigrator.html";
30
31 protected List<Matcher> matcherList = new ArrayList<>();
32 String expression;
33
34 @Override
35 public void start() {
36 stop();
37 addWarn(MSG_0);
38 addWarn(MSG_1);
39 addWarn(MSG_2);
40 }
41
42 @Override
43 public boolean evaluate(ILoggingEvent event) throws NullPointerException, EvaluationException {
44 return false;
45 }
46
47 public String getExpression() {
48 return expression;
49 }
50
51 public void setExpression(String expression) {
52 this.expression = expression;
53 }
54
55 public void addMatcher(Matcher matcher) {
56 matcherList.add(matcher);
57 }
58
59 }