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, wait
close, requiresLayout
protected ErrorHandler errorHandler
protected Filter headFilter
protected Filter tailFilter
protected boolean closed
public AppenderSkeleton()
protected AppenderSkeleton(boolean isActive)
public void activateOptions()
activateOptions
in interface OptionHandler
public void addFilter(Filter newFilter)
Appender
protected abstract void append(LoggingEvent event)
public void clearFilters()
Appender
clearFilters
in interface Appender
public ErrorHandler getErrorHandler()
Appender
ErrorHandler
for this appender.getErrorHandler
in interface Appender
public Filter getFilter()
Appender
public final Filter getFirstFilter()
public Layout getLayout()
Appender
public final String getName()
Appender
public Priority getThreshold()
public boolean isAsSevereAsThreshold(Priority priority)
public void doAppend(LoggingEvent event)
public void setErrorHandler(ErrorHandler eh)
ErrorHandler
for this Appender.setErrorHandler
in interface Appender
eh
- The error handler.public void setLayout(Layout layout)
Appender
Layout
for this appender.public void setName(String name)
Appender
public 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.