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)
AppenderAttachable
addAppender
in interface AppenderAttachable
newAppender
- The Appender to add.public Enumeration<Appender> getAllAppenders()
AppenderAttachable
getAllAppenders
in interface AppenderAttachable
public Appender getAppender(String name)
AppenderAttachable
getAppender
in interface AppenderAttachable
name
- The name of the Appender.public boolean isAttached(Appender appender)
AppenderAttachable
true
if the specified appender is in list of
attached attached, false
otherwise.isAttached
in interface AppenderAttachable
appender
- The Appender to check.public void removeAllAppenders()
AppenderAttachable
removeAllAppenders
in interface AppenderAttachable
public void removeAppender(Appender appender)
AppenderAttachable
removeAppender
in interface AppenderAttachable
appender
- The Appender to remove.public void removeAppender(String name)
AppenderAttachable
removeAppender
in interface AppenderAttachable
name
- 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.