FileDocCategorySizeDatePackage
VectorAppender.javaAPI DocApache log4j 1.2.152027Sat Aug 25 00:09:34 BST 2007org.apache.log4j

VectorAppender

public class VectorAppender extends AppenderSkeleton
An appender that appends logging events to a vector.
author
Ceki Gülcü

Fields Summary
public Vector
vector
Constructors Summary
public VectorAppender()

    vector = new Vector();
  
Methods Summary
public voidactivateOptions()
Does nothing.

  
public voidappend(org.apache.log4j.spi.LoggingEvent event)
This method is called by the {@link AppenderSkeleton#doAppend} method.

    //System.out.println("---Vector appender called with message ["+event.getRenderedMessage()+"].");
    //System.out.flush();
    try {
      Thread.currentThread().sleep(100);
    } catch(Exception e) {
    }
    vector.addElement(event);
   
public synchronized voidclose()

    if(this.closed)
      return;
    this.closed = true;
  
public java.util.VectorgetVector()

    return vector;
  
public booleanisClosed()

    return closed;
  
public booleanrequiresLayout()

    return false;