1   /*
2    * Logback: the reliable, generic, fast and flexible logging framework.
3    * Copyright (C) 1999-2026, QOS.ch. All rights reserved.
4    *
5    * This program and the accompanying materials are dual-licensed under
6    * either the terms of the Eclipse Public License v2.0 as published by
7    * the Eclipse Foundation
8    *
9    *   or (per the licensee's choosing)
10   *
11   * under the terms of the GNU Lesser General Public License version 2.1
12   * as published by the Free Software Foundation.
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  }