1
2
3
4
5
6
7
8
9
10 package ch.qos.logback.core.joran.action.ext;
11
12 import org.xml.sax.Attributes;
13
14 import ch.qos.logback.core.joran.action.Action;
15 import ch.qos.logback.core.joran.spi.InterpretationContext;
16
17
18
19 public class HelloAction extends Action {
20
21
22 static final public String PROPERTY_KEY = "name";
23
24 public HelloAction() {
25 }
26
27
28
29
30 public void begin(InterpretationContext ec, String name, Attributes attributes) {
31 String str = "Hello "+attributes.getValue("name")+".";
32 ec.getContext().putProperty(PROPERTY_KEY, str);
33 }
34
35
36
37
38
39 public void end(InterpretationContext ec, String name) {
40 }
41 }