1   package org.slf4j;
2   
3   import java.util.ArrayList;
4   import java.util.List;
5   
6   import org.apache.log4j.AppenderSkeleton;
7   import org.apache.log4j.spi.LoggingEvent;
8   
9   public class ListAppender extends AppenderSkeleton {
10  
11    public List list = new ArrayList();
12    
13    public boolean extractLocationInfo = false;
14    
15    protected void append(LoggingEvent event) {
16      list.add(event);
17      if(extractLocationInfo) {
18        event.getLocationInformation();
19      }
20    }
21  
22    public void close() {
23    }
24  
25    public boolean requiresLayout() {
26      return false;
27    }
28  
29  }