1
2
3
4
5
6
7
8
9
10
11
12
13
14 package ch.qos.logback.core.joran.event;
15
16 import org.xml.sax.Locator;
17
18 public class BodyEvent extends SaxEvent {
19
20 private String text;
21
22 BodyEvent(String text, Locator locator) {
23 super(null, null, null, locator);
24 this.text = text;
25 }
26
27
28
29
30
31
32 public String getText() {
33 if (text != null) {
34 return text.trim();
35 }
36 return text;
37 }
38
39 @Override
40 public String toString() {
41 return "BodyEvent(" + getText() + ")" + locator.getLineNumber() + "," + locator.getColumnNumber();
42 }
43
44 public void append(String str) {
45 text += str;
46 }
47
48 }