public class AppenderAttachableImpl extends Object implements AppenderAttachable
| Modifier and Type | Field and Description |
|---|---|
protected Vector |
appenderList
Array of appenders.
|
| Constructor and Description |
|---|
AppenderAttachableImpl() |
| Modifier and Type | Method and Description |
|---|---|
void |
addAppender(Appender appender)
Add an appender.
|
int |
appendLoopOnAppenders(LoggingEvent event)
Calls the
doAppend method on all attached appenders. |
void |
close()
Closes all appenders.
|
Enumeration<Appender> |
getAllAppenders()
Get all previously added appenders as an Enumeration.
|
Appender |
getAppender(String name)
Get an appender by name.
|
boolean |
isAttached(Appender appender)
Returns
true if the specified appender is in list of
attached, false otherwise. |
void |
removeAllAppenders()
Remove all previously added appenders.
|
void |
removeAppender(Appender appender)
Remove the appender passed as parameter from the list of appenders.
|
void |
removeAppender(String name)
Remove the appender with the name passed as parameter from the
list of appenders.
|
protected Vector appenderList
public void addAppender(Appender appender)
AppenderAttachableaddAppender in interface AppenderAttachableappender - The Appender to add.public int appendLoopOnAppenders(LoggingEvent event)
doAppend method on all attached appenders.event - The event to log.public void close()
public Enumeration<Appender> getAllAppenders()
AppenderAttachablegetAllAppenders in interface AppenderAttachablepublic Appender getAppender(String name)
AppenderAttachablegetAppender in interface AppenderAttachablename - The name of the Appender.public boolean isAttached(Appender appender)
AppenderAttachabletrue if the specified appender is in list of
attached, false otherwise.isAttached in interface AppenderAttachableappender - The Appender to check.public void removeAllAppenders()
AppenderAttachableremoveAllAppenders in interface AppenderAttachablepublic void removeAppender(Appender appender)
AppenderAttachableremoveAppender in interface AppenderAttachableappender - The Appender to remove.public void removeAppender(String name)
AppenderAttachableremoveAppender in interface AppenderAttachablename - The name of the Appender to remove.Copyright © 1999-2022 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.