Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

net.jxta.ext.config
Class ConfiguratorTest.LogErrorAppender  view ConfiguratorTest.LogErrorAppender download ConfiguratorTest.LogErrorAppender.java

java.lang.Object
  extended byorg.apache.log4j.AppenderSkeleton
      extended bynet.jxta.ext.config.ConfiguratorTest.LogErrorAppender
All Implemented Interfaces:
org.apache.log4j.Appender, org.apache.log4j.spi.OptionHandler
Enclosing class:
ConfiguratorTest

private static class ConfiguratorTest.LogErrorAppender
extends org.apache.log4j.AppenderSkeleton

Custom appender to catch exceptions that would otherwise disappear in the log.


Field Summary
 
Fields inherited from class org.apache.log4j.AppenderSkeleton
closed, errorHandler, headFilter, layout, name, tailFilter, threshold
 
Constructor Summary
private ConfiguratorTest.LogErrorAppender()
           
 
Method Summary
protected  void append(org.apache.log4j.spi.LoggingEvent event)
          Subclasses of AppenderSkeleton should implement this method to perform actual logging.
 void close()
          Release any resources allocated within the appender such as file handles, network connections, etc.
 boolean requiresLayout()
          Configurators call this method to determine if the appender requires a layout.
 
Methods inherited from class org.apache.log4j.AppenderSkeleton
activateOptions, addFilter, clearFilters, doAppend, 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

ConfiguratorTest.LogErrorAppender

private ConfiguratorTest.LogErrorAppender()
Method Detail

append

protected void append(org.apache.log4j.spi.LoggingEvent event)
Description copied from class: org.apache.log4j.AppenderSkeleton
Subclasses of AppenderSkeleton should implement this method to perform actual logging. See also AppenderSkeleton.doAppend 55 method.


close

public void close()
Description copied from interface: org.apache.log4j.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.


requiresLayout

public boolean requiresLayout()
Description copied from interface: org.apache.log4j.Appender
Configurators call this method to determine if the appender requires a layout. If this method returns true, meaning that layout is required, then the configurator will configure an layout using the configuration information at its disposal. If this method returns false, meaning that a layout is not required, then layout configuration will be skipped even if there is available layout configuration information at the disposal of the configurator..

In the rather exceptional case, where the appender implementation admits a layout but can also work without it, then the appender should return true.