Package org.apache.log4j.varia
Class ListModelAppender
- java.lang.Object
-
- org.apache.log4j.AppenderSkeleton
-
- org.apache.log4j.varia.ListModelAppender
-
- All Implemented Interfaces:
org.apache.log4j.Appender,org.apache.log4j.spi.OptionHandler
public final class ListModelAppender extends org.apache.log4j.AppenderSkeletonA very basic appender that takes the events and stores them in to a ListModel for late retrieval.- Author:
- Paul Smith (psmith@apache.org)
-
-
Constructor Summary
Constructors Constructor Description ListModelAppender()Constructs a ListModelAppender.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidappend(org.apache.log4j.spi.LoggingEvent event)voidclearModel()Removes all the Events from the model.voidclose()ListModel<org.apache.log4j.spi.LoggingEvent>getModel()Returns a reference to the ListModel that contains all the LoggingEvents that have been appended to this class.booleanrequiresLayout()
-
-
-
Method Detail
-
getModel
public ListModel<org.apache.log4j.spi.LoggingEvent> getModel()
Returns a reference to the ListModel that contains all the LoggingEvents that have been appended to this class.- Returns:
- the list model
-
append
protected void append(org.apache.log4j.spi.LoggingEvent event)
- Specified by:
appendin classorg.apache.log4j.AppenderSkeleton
-
close
public void close()
-
clearModel
public void clearModel()
Removes all the Events from the model.
-
requiresLayout
public boolean requiresLayout()
-
-