Package org.apache.log4j
Class AppenderSkeleton
java.lang.Object
org.apache.log4j.AppenderSkeleton
- All Implemented Interfaces:
Appender,OptionHandler
- Direct Known Subclasses:
NullAppender,VectorAppender,WriterAppender
The base class for Appenders in Log4j 1. Appenders constructed using this are ignored in Log4j 2.
-
Nested Class Summary
Nested Classes -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidvoidAdd a filter to the end of the filter list.protected abstract voidappend(LoggingEvent event) voidClear the list of filters by removing all the filters in it.voiddoAppend(LoggingEvent event) Log inAppenderspecific way.voidfinalize()Returns theErrorHandlerfor this appender.Returns the head Filter.final FilterReturns this appenders layout.final StringgetName()Get the name of this appender.booleanisAsSevereAsThreshold(Priority priority) voidSets theErrorHandlerfor this Appender.voidSet theLayoutfor this appender.voidSet the name of this appender.voidsetThreshold(Priority threshold) Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.apache.log4j.Appender
close, requiresLayout
-
Field Details
-
layout
-
name
-
threshold
-
errorHandler
-
headFilter
-
tailFilter
-
closed
protected boolean closed
-
-
Constructor Details
-
AppenderSkeleton
public AppenderSkeleton()Create new instance. -
AppenderSkeleton
protected AppenderSkeleton(boolean isActive)
-
-
Method Details
-
activateOptions
public void activateOptions()- Specified by:
activateOptionsin interfaceOptionHandler
-
addFilter
Description copied from interface:AppenderAdd a filter to the end of the filter list. -
append
-
clearFilters
public void clearFilters()Description copied from interface:AppenderClear the list of filters by removing all the filters in it.- Specified by:
clearFiltersin interfaceAppender
-
finalize
public void finalize() -
getErrorHandler
Description copied from interface:AppenderReturns theErrorHandlerfor this appender.- Specified by:
getErrorHandlerin interfaceAppender- Returns:
- The error handler.
-
getFilter
Description copied from interface:AppenderReturns the head Filter. The Filters are organized in a linked list and so all Filters on this Appender are available through the result. -
getFirstFilter
-
getLayout
Description copied from interface:AppenderReturns this appenders layout. -
getName
Description copied from interface:AppenderGet the name of this appender. -
getThreshold
-
isAsSevereAsThreshold
-
doAppend
Description copied from interface:AppenderLog inAppenderspecific way. When appropriate, Loggers will call thedoAppendmethod of appender implementations in order to log. -
setErrorHandler
Sets theErrorHandlerfor this Appender.- Specified by:
setErrorHandlerin interfaceAppender- Parameters:
eh- The error handler.- Since:
- 0.9.0
-
setLayout
Description copied from interface:AppenderSet theLayoutfor this appender. -
setName
Description copied from interface:AppenderSet the name of this appender. The name is used by other components to identify this appender. -
setThreshold
-