org.apache.log4j
public abstract class AppenderSkeleton extends Object implements Appender, OptionHandler
Since: 0.8.1
Field Summary | |
---|---|
protected boolean | closed
Is this appender closed? |
protected ErrorHandler | errorHandler
It is assumed and enforced that errorHandler is never null. |
protected Filter | headFilter The first filter in the filter chain. |
protected Layout | layout The layout variable does not need to be set if the appender
implementation has its own layout. |
protected String | name Appenders are named. |
protected Filter | tailFilter The last filter in the filter chain. |
protected Priority | threshold
There is no level threshold filtering by default. |
Method Summary | |
---|---|
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 AppenderSkeleton should 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 {@link
AppenderSkeleton#append} method.
|
void | finalize()
Finalize this appender by calling the derived class'
close method. |
ErrorHandler | getErrorHandler()
Return the currently set {@link ErrorHandler} for 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 FileAppender. |
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 {@link ErrorHandler} for 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. |
null
initially.Since: 0.9.0
AppenderSkeleton
should implement this
method to perform actual logging. See also {@link #doAppend
AppenderSkeleton.doAppend} method.Since: 0.9.0
Since: 0.9.0
close
method.Since: 0.8.4
Since: 0.9.0
Since: 1.1
null
if no is
filter is set.Since: 1.1
true
.Since: 0.9.0
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.
Since: 0.8.3