java.lang.Object | |
↳ | org.apache.log4j.AppenderSkeleton |
Known Direct Subclasses |
Known Indirect Subclasses |
Abstract superclass of the other appenders in the package. This class provides the code for common functionality, such as support for threshold filtering and support for general filters.
Fields | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
closed | Is this appender closed? | ||||||||||
errorHandler | It is assumed and enforced that errorHandler is never null. | ||||||||||
headFilter | The first filter in the filter chain. | ||||||||||
layout | The layout variable does not need to be set if the appender implementation has its own layout. | ||||||||||
name | Appenders are named. | ||||||||||
tailFilter | The last filter in the filter chain. | ||||||||||
threshold | There is no level threshold filtering by default. |
Public Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Create new instance.
|
Protected Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Create new instance.
|
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Derived appenders should override this method if option structure
requires it.
| |||||||||||
Add a filter to end of the filter list.
| |||||||||||
Clear the filters chain.
| |||||||||||
This method performs threshold checks and invokes filters before
delegating actual logging to the subclasses specific
append(LoggingEvent) method. | |||||||||||
Finalize this appender by calling the derived class'
close method. | |||||||||||
Return the currently set
ErrorHandler for this
Appender. | |||||||||||
Returns the head Filter.
| |||||||||||
Return the first filter in the filter chain for this
Appender.
| |||||||||||
Returns the layout of this appender.
| |||||||||||
Returns the name of this appender.
| |||||||||||
Returns this appenders threshold level.
| |||||||||||
Check whether the message level is below the appender's
threshold.
| |||||||||||
Set the
ErrorHandler for this Appender. | |||||||||||
Set the layout for this appender.
| |||||||||||
Set the name of this Appender.
| |||||||||||
Set the threshold level.
|
Protected Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Subclasses of
AppenderSkeleton should implement this
method to perform actual logging. |
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From class
java.lang.Object
| |||||||||||
From interface
org.apache.log4j.Appender
| |||||||||||
From interface
org.apache.log4j.spi.OptionHandler
|
Is this appender closed?
The layout variable does not need to be set if the appender implementation has its own layout.
Appenders are named.
Create new instance.
Create new instance. Provided for compatibility with log4j 1.3.
isActive | true if appender is ready for use upon construction. Not used in log4j 1.2.x. |
---|
Derived appenders should override this method if option structure requires it.
Clear the filters chain.
This method performs threshold checks and invokes filters before
delegating actual logging to the subclasses specific append(LoggingEvent)
method.
Finalize this appender by calling the derived class'
close
method.
Returns the head Filter.
Return the first filter in the filter chain for this
Appender. The return value may be null
if no is
filter is set.
Returns the name of this appender.
Returns this appenders threshold level. See the setThreshold(Priority)
method for the meaning of this option.
Check whether the message level is below the appender's
threshold. If there is no threshold set, then the return value is
always true
.
Set the layout for this appender. Note that some appenders have
their own (fixed) layouts or do not use one. For example, the
SocketAppender
ignores the layout set
here.
Set the name of this Appender.
Set the threshold level. All log events with lower level than the threshold level are ignored by the appender.
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.
Subclasses of AppenderSkeleton
should implement this
method to perform actual logging. See also AppenderSkeleton.doAppend
method.