FileDocCategorySizeDatePackage
NullAppender.javaAPI DocApache log4j 1.2.151849Sat Aug 25 00:09:36 BST 2007org.apache.log4j.performance

NullAppender

public class NullAppender extends AppenderSkeleton
A bogus appender which calls the format method of its layout object but does not write the result anywhere.

The org.apache.log4j.performance.NullAppender class is intended for internal use only. Consequently, it is not included in the log4j.jar file.

Fields Summary
public static String
s
public String
t
Constructors Summary
public NullAppender()

public NullAppender(Layout layout)

    this.layout = layout;
  
Methods Summary
public voidappend(org.apache.log4j.spi.LoggingEvent event)

  
public voidclose()

public voiddoAppend(org.apache.log4j.spi.LoggingEvent event)

    if(layout != null) {
      t = layout.format(event);
      s = t;
    }
  
public booleanrequiresLayout()
This is a bogus appender but it still uses a layout.

    return true;