public abstract class AppenderSkeleton extends Object implements Appender, OptionHandler
| Modifier and Type | Field and Description | 
|---|---|
| protected boolean | closedIs this appender closed? | 
| protected ErrorHandler | errorHandlerIt is assumed and enforced that errorHandler is never null. | 
| protected Filter | headFilterThe first filter in the filter chain. | 
| protected Layout | layoutThe layout variable does not need to be set if the appender
      implementation has its own layout. | 
| protected String | nameAppenders are named. | 
| protected Filter | tailFilterThe last filter in the filter chain. | 
| protected Priority | thresholdThere is no level threshold filtering by default. | 
| Modifier | Constructor and Description | 
|---|---|
|   | AppenderSkeleton()Create new instance. | 
| protected  | AppenderSkeleton(boolean isActive)Create new instance. | 
| Modifier and Type | Method and Description | 
|---|---|
| void | activateOptions()Derived appenders should override this method if option structure
     requires it. | 
| void | addFilter(Filter newFilter)Add a filter to end of the filter list. | 
| protected abstract void | append(LoggingEvent event)Subclasses of  AppenderSkeletonshould implement this
     method to perform actual logging. | 
| void | clearFilters()Clear the filters chain. | 
| void | doAppend(LoggingEvent event)This method performs threshold checks and invokes filters before
 delegating actual logging to the subclasses specific  append(org.apache.log4j.spi.LoggingEvent)method. | 
| void | finalize()Finalize this appender by calling the derived class'
      closemethod. | 
| ErrorHandler | getErrorHandler()Return the currently set  ErrorHandlerfor this
      Appender. | 
| Filter | getFilter()Returns the head Filter. | 
| Filter | getFirstFilter()Return the first filter in the filter chain for this
      Appender. | 
| Layout | getLayout()Returns the layout of this appender. | 
| String | getName()Returns the name of this appender. | 
| Priority | getThreshold()Returns this appenders threshold level. | 
| boolean | isAsSevereAsThreshold(Priority priority)Check whether the message level is below the appender's
     threshold. | 
| void | setErrorHandler(ErrorHandler eh)Set the  ErrorHandlerfor this Appender. | 
| void | setLayout(Layout layout)Set the layout for this appender. | 
| void | setName(String name)Set the name of this Appender. | 
| void | setThreshold(Priority threshold)Set the threshold level. | 
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitclose, requiresLayoutprotected Layout layout
protected String name
protected Priority threshold
protected ErrorHandler errorHandler
protected Filter headFilter
null
      initially.protected Filter tailFilter
protected boolean closed
public AppenderSkeleton()
protected AppenderSkeleton(boolean isActive)
isActive - true if appender is ready for use upon construction.
                 Not used in log4j 1.2.x.public void activateOptions()
activateOptions in interface OptionHandlerpublic void addFilter(Filter newFilter)
protected abstract void append(LoggingEvent event)
AppenderSkeleton should implement this
     method to perform actual logging. See also AppenderSkeleton.doAppend method.public void clearFilters()
clearFilters in interface Appenderpublic void finalize()
close method.public ErrorHandler getErrorHandler()
ErrorHandler for this
      Appender.getErrorHandler in interface Appenderpublic Filter getFilter()
public final Filter getFirstFilter()
null if no is
      filter is set.public Layout getLayout()
public final String getName()
public Priority getThreshold()
setThreshold(org.apache.log4j.Priority) method for the meaning of this option.public boolean isAsSevereAsThreshold(Priority priority)
true.public void doAppend(LoggingEvent event)
append(org.apache.log4j.spi.LoggingEvent) method.public void setErrorHandler(ErrorHandler eh)
ErrorHandler for this Appender.setErrorHandler in interface Appenderpublic void setLayout(Layout layout)
SocketAppender ignores the layout set
     here.public void setName(String name)
public void setThreshold(Priority threshold)
In configuration files this option is specified by setting the value of the Threshold option to a level string, such as "DEBUG", "INFO" and so on.
Copyright © 2012 JBoss by Red Hat. All Rights Reserved.