public class

AppenderAttachableImpl

extends Object
implements AppenderAttachable
java.lang.Object
   ↳ org.apache.log4j.helpers.AppenderAttachableImpl

Class Overview

A straightforward implementation of the AppenderAttachable interface.

Summary

Fields
protected Vector appenderList Array of appenders.
Public Constructors
AppenderAttachableImpl()
Public Methods
void addAppender(Appender newAppender)
Attach an appender.
int appendLoopOnAppenders(LoggingEvent event)
Call the doAppend method on all attached appenders.
Enumeration getAllAppenders()
Get all attached appenders as an Enumeration.
Appender getAppender(String name)
Look for an attached appender named as name.
boolean isAttached(Appender appender)
Returns true if the specified appender is in the list of attached appenders, false otherwise.
void removeAllAppenders()
Remove and close all previously attached appenders.
void removeAppender(String name)
Remove the appender with the name passed as parameter form the list of appenders.
void removeAppender(Appender appender)
Remove the appender passed as parameter form the list of attached appenders.
[Expand]
Inherited Methods
From class java.lang.Object
From interface org.apache.log4j.spi.AppenderAttachable

Fields

protected Vector appenderList

Array of appenders.

Public Constructors

public AppenderAttachableImpl ()

Public Methods

public void addAppender (Appender newAppender)

Attach an appender. If the appender is already in the list in won't be added again.

public int appendLoopOnAppenders (LoggingEvent event)

Call the doAppend method on all attached appenders.

public Enumeration getAllAppenders ()

Get all attached appenders as an Enumeration. If there are no attached appenders null is returned.

Returns
  • Enumeration An enumeration of attached appenders.

public Appender getAppender (String name)

Look for an attached appender named as name.

Return the appender with that name if in the list. Return null otherwise.

public boolean isAttached (Appender appender)

Returns true if the specified appender is in the list of attached appenders, false otherwise.

public void removeAllAppenders ()

Remove and close all previously attached appenders.

public void removeAppender (String name)

Remove the appender with the name passed as parameter form the list of appenders.

public void removeAppender (Appender appender)

Remove the appender passed as parameter form the list of attached appenders.