public class AppenderAttachableImpl extends Object implements AppenderAttachable
| Constructor and Description |
|---|
AppenderAttachableImpl() |
| Modifier and Type | Method and Description |
|---|---|
void |
addAppender(Appender newAppender)
Add an appender.
|
int |
appendLoopOnAppenders(LoggingEvent event)
Call the
doAppend method on all attached appenders. |
void |
close() |
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 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.
|
public AppenderAttachableImpl()
public void addAppender(Appender newAppender)
AppenderAttachableaddAppender in interface AppenderAttachablenewAppender - The Appender to add.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 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.public int appendLoopOnAppenders(LoggingEvent event)
doAppend method on all attached appenders.event - The event to log.public void close()
Copyright © 1999-1969 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.