1
2
3
4
5
6
7
8
9
10
11
12
13
14 package ch.qos.logback.core;
15
16 import ch.qos.logback.core.spi.ContextAwareBase;
17
18 abstract public class LayoutBase<E> extends ContextAwareBase implements Layout<E> {
19
20 protected boolean started;
21
22 String fileHeader;
23 String fileFooter;
24 String presentationHeader;
25 String presentationFooter;
26
27 public void setContext(Context context) {
28 this.context = context;
29 }
30
31 public Context getContext() {
32 return this.context;
33 }
34
35 public void start() {
36 started = true;
37 }
38
39 public void stop() {
40 started = false;
41 }
42
43 public boolean isStarted() {
44 return started;
45 }
46
47 public String getFileHeader() {
48 return fileHeader;
49 }
50
51 public String getPresentationHeader() {
52 return presentationHeader;
53 }
54
55 public String getPresentationFooter() {
56 return presentationFooter;
57 }
58
59 public String getFileFooter() {
60 return fileFooter;
61 }
62
63 public String getContentType() {
64 return "text/plain";
65 }
66
67 public void setFileHeader(String header) {
68 this.fileHeader = header;
69 }
70
71 public void setFileFooter(String footer) {
72 this.fileFooter = footer;
73 }
74
75 public void setPresentationHeader(String header) {
76 this.presentationHeader = header;
77 }
78
79 public void setPresentationFooter(String footer) {
80 this.presentationFooter = footer;
81 }
82 }