Package org.apache.log4j.receivers.varia
Class ListModelAppender
- java.lang.Object
-
- org.apache.log4j.AppenderSkeleton
-
- org.apache.log4j.receivers.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.
-
-
Field Summary
Fields Modifier and Type Field Description private javax.swing.DefaultListModelmodelDefault list model.
-
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()javax.swing.ListModelgetModel()Returns a reference to the ListModel that contains all the LoggingEvents that have been appended to this class.booleanrequiresLayout()
-
-
-
Method Detail
-
getModel
public javax.swing.ListModel 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()
-
-