1   /**
2    * Logback: the generic, reliable, fast and flexible logging framework.
3    * 
4    * Copyright (C) 2000-2008, QOS.ch
5    * 
6    * This library is free software, you can redistribute it and/or modify it under
7    * the terms of the GNU Lesser General Public License as published by the Free
8    * Software Foundation.
9    */
10  package ch.qos.logback.access.testUtil;
11  
12  import java.util.ArrayList;
13  import java.util.List;
14  
15  import ch.qos.logback.access.spi.AccessEvent;
16  import ch.qos.logback.core.AppenderBase;
17  
18  public class NotifyingListAppender extends AppenderBase<AccessEvent> {
19  
20    public List<AccessEvent> list = new ArrayList<AccessEvent>();
21    
22    protected void append(AccessEvent e) {
23      list.add(e);
24      synchronized (this) {
25        this.notify();
26      }
27    }
28  }