public abstract class AppenderSkeleton extends Object implements Appender, OptionHandler
| Modifier and Type | Class and Description |
|---|---|
static class |
AppenderSkeleton.NoOpErrorHandler |
| Modifier and Type | Field and Description |
|---|---|
protected boolean |
closed |
protected ErrorHandler |
errorHandler |
protected Filter |
headFilter |
protected Layout |
layout |
protected String |
name |
protected Filter |
tailFilter |
protected Priority |
threshold |
| Modifier | Constructor and Description |
|---|---|
|
AppenderSkeleton()
Create new instance.
|
protected |
AppenderSkeleton(boolean isActive) |
| Modifier and Type | Method and Description |
|---|---|
void |
activateOptions() |
void |
addFilter(Filter newFilter)
Add a filter to the end of the filter list.
|
protected abstract void |
append(LoggingEvent event) |
void |
clearFilters()
Clear the list of filters by removing all the filters in it.
|
void |
doAppend(LoggingEvent event)
This method is never going to be called in Log4j 2 so there isn't much point in having any code in it.
|
void |
finalize() |
ErrorHandler |
getErrorHandler()
Returns the
ErrorHandler for this appender. |
Filter |
getFilter()
Returns the head Filter.
|
Filter |
getFirstFilter() |
Layout |
getLayout()
Returns this appenders layout.
|
String |
getName()
Get the name of this appender.
|
Priority |
getThreshold() |
boolean |
isAsSevereAsThreshold(Priority priority) |
void |
setErrorHandler(ErrorHandler eh)
Set the
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) |
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitclose, requiresLayoutprotected ErrorHandler errorHandler
protected Filter headFilter
protected Filter tailFilter
protected boolean closed
public AppenderSkeleton()
protected AppenderSkeleton(boolean isActive)
public void activateOptions()
activateOptions in interface OptionHandlerpublic void addFilter(Filter newFilter)
Appenderprotected abstract void append(LoggingEvent event)
public void clearFilters()
AppenderclearFilters in interface Appenderpublic ErrorHandler getErrorHandler()
AppenderErrorHandler for this appender.getErrorHandler in interface Appenderpublic Filter getFilter()
Appenderpublic final Filter getFirstFilter()
public Layout getLayout()
Appenderpublic final String getName()
Appenderpublic Priority getThreshold()
public boolean isAsSevereAsThreshold(Priority priority)
public void doAppend(LoggingEvent event)
public void setErrorHandler(ErrorHandler eh)
ErrorHandler for this Appender.setErrorHandler in interface Appendereh - The error handler.public void setLayout(Layout layout)
AppenderLayout for this appender.public void setName(String name)
Appenderpublic void setThreshold(Priority threshold)
Copyright © 1999-2021 The Apache Software Foundation. All Rights Reserved.
Apache Logging, Apache Log4j, Log4j, Apache, the Apache feather logo, the Apache Logging project logo, and the Apache Log4j logo are trademarks of The Apache Software Foundation.