Log4j 1.3alpha-7

org.apache.log4j.varia
Class NullAppender

java.lang.Object
  extended byorg.apache.log4j.spi.ComponentBase
      extended byorg.apache.log4j.AppenderSkeleton
          extended byorg.apache.log4j.varia.NullAppender
All Implemented Interfaces:
Appender, Component, OptionHandler

public class NullAppender
extends AppenderSkeleton

A NullAppender merely exists, it never outputs a message to any device.

Author:
Ceki Gülc¨

Field Summary
 
Fields inherited from class org.apache.log4j.AppenderSkeleton
active, closed, headFilter, layout, name, tailFilter, threshold
 
Fields inherited from class org.apache.log4j.spi.ComponentBase
repository
 
Constructor Summary
NullAppender()
           
 
Method Summary
protected  void append(LoggingEvent event)
          Does not do anything.
 void close()
          Release any resources allocated within the appender such as file handles, network connections, etc.
 void doAppend(LoggingEvent event)
          Does not do anything.
static NullAppender getInstance()
          Whenever you can, use this method to retreive an instance instead of instantiating a new one with new.
 
Methods inherited from class org.apache.log4j.AppenderSkeleton
activateOptions, addFilter, clearFilters, finalize, getErrorHandler, getFilter, getFirstFilter, getLayout, getName, getThreshold, isActive, isAsSevereAsThreshold, isClosed, setErrorHandler, setLayout, setName, setThreshold
 
Methods inherited from class org.apache.log4j.spi.ComponentBase
getLogger, getLoggerRepository, getNonFloodingLogger, resetErrorCount, setLoggerRepository
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.apache.log4j.Appender
setLoggerRepository
 

Constructor Detail

NullAppender

public NullAppender()
Method Detail

getInstance

public static NullAppender getInstance()
Whenever you can, use this method to retreive an instance instead of instantiating a new one with new.


close

public void close()
Description copied from interface: Appender
Release any resources allocated within the appender such as file handles, network connections, etc.

It is a programming error to append to a closed appender.


doAppend

public void doAppend(LoggingEvent event)
Does not do anything.

Specified by:
doAppend in interface Appender
Overrides:
doAppend in class AppenderSkeleton

append

protected void append(LoggingEvent event)
Does not do anything.

Specified by:
append in class AppenderSkeleton

Log4j 1.3alpha-7

Copyright 2000-2005 Apache Software Foundation.