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