1
2
3
4
5
6
7
8
9
10
11
12
13
14 package ch.qos.logback.core.testUtil;
15
16 import java.util.ArrayList;
17 import java.util.List;
18
19 import ch.qos.logback.core.spi.LifeCycle;
20 import ch.qos.logback.core.status.Status;
21 import ch.qos.logback.core.status.StatusListener;
22
23 public class TrivialStatusListener implements StatusListener, LifeCycle {
24
25 public List<Status> list = new ArrayList<Status>();
26 boolean start = false;
27
28 public void addStatusEvent(Status status) {
29 if (!isStarted())
30 return;
31 list.add(status);
32 }
33
34 public void start() {
35 start = true;
36 }
37
38 public void stop() {
39 start = false;
40 }
41
42 public boolean isStarted() {
43 return start;
44 }
45 }