Log4j Version 1.2.7: Class NullAppender
Log4j 1.2.7

org.apache.log4j.varia
Class NullAppender


java.lang.Object

  |

  +--org.apache.log4j.AppenderSkeleton

        |

        +--org.apache.log4j.varia.NullAppender

All Implemented Interfaces:
Appender, OptionHandler

public class NullAppender
extends AppenderSkeleton

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

Author:
Ceki Gülc¨

Fields inherited from class org.apache.log4j.AppenderSkeleton
closed, errorHandler, headFilter, layout, name, tailFilter, threshold
 
Constructor Summary
NullAppender()
           
 
Method Summary
 void activateOptions()
          There are no options to acticate.
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.
 NullAppender getInstance()
          Whenever you can, use this method to retreive an instance instead of instantiating a new one with new.
 boolean requiresLayout()
          NullAppenders do not need a layout.
 
Methods inherited from class org.apache.log4j.AppenderSkeleton
addFilter, clearFilters, finalize, getErrorHandler, getFilter, getFirstFilter, getLayout, getName, getThreshold, isAsSevereAsThreshold, setErrorHandler, setLayout, setName, setThreshold
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

NullAppender


public NullAppender()
Method Detail

activateOptions


public void activateOptions()
There are no options to acticate.
Overrides:
activateOptions in class AppenderSkeleton

getInstance


public 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.
Overrides:
doAppend in class AppenderSkeleton

append


protected void append(LoggingEvent event)
Does not do anything.
Overrides:
append in class AppenderSkeleton

requiresLayout


public boolean requiresLayout()
NullAppenders do not need a layout.

Log4j 1.2.7

Copyright 2000-2002 Apache Software Foundation.