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 TypeMethodDescriptionvoid
void
Add a filter to the end of the filter list.protected abstract void
append
(LoggingEvent event) void
Clear the list of filters by removing all the filters in it.void
doAppend
(LoggingEvent event) Log inAppender
specific way.void
finalize()
Returns theErrorHandler
for this appender.Returns the head Filter.final Filter
Returns this appenders layout.final String
getName()
Get the name of this appender.boolean
isAsSevereAsThreshold
(Priority priority) void
Sets theErrorHandler
for this Appender.void
Set theLayout
for this appender.void
Set the name of this appender.void
setThreshold
(Priority threshold) 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
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:
activateOptions
in interfaceOptionHandler
-
addFilter
Description copied from interface:Appender
Add a filter to the end of the filter list. -
append
-
clearFilters
public void clearFilters()Description copied from interface:Appender
Clear the list of filters by removing all the filters in it.- Specified by:
clearFilters
in interfaceAppender
-
finalize
public void finalize() -
getErrorHandler
Description copied from interface:Appender
Returns theErrorHandler
for this appender.- Specified by:
getErrorHandler
in interfaceAppender
- Returns:
- The error handler.
-
getFilter
Description copied from interface:Appender
Returns 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:Appender
Returns this appenders layout. -
getName
Description copied from interface:Appender
Get the name of this appender. -
getThreshold
-
isAsSevereAsThreshold
-
doAppend
Description copied from interface:Appender
Log inAppender
specific way. When appropriate, Loggers will call thedoAppend
method of appender implementations in order to log. -
setErrorHandler
Sets theErrorHandler
for this Appender.- Specified by:
setErrorHandler
in interfaceAppender
- Parameters:
eh
- The error handler.- Since:
- 0.9.0
-
setLayout
Description copied from interface:Appender
Set theLayout
for this appender. -
setName
Description copied from interface:Appender
Set the name of this appender. The name is used by other components to identify this appender. -
setThreshold
-