org.apache.log4j.varia
Class ListModelAppender
java.lang.Object
|
+--org.apache.log4j.spi.ComponentBase
|
+--org.apache.log4j.AppenderSkeleton
|
+--org.apache.log4j.varia.ListModelAppender
- All Implemented Interfaces:
- Appender, Component, OptionHandler
- public final class ListModelAppender
- extends AppenderSkeleton
A very basic appender that takes the events and stores them in to a
ListModel for late retrieval.
- Author:
- Paul Smith
Method Summary |
protected void |
append(LoggingEvent event)
Subclasses of AppenderSkeleton should implement this method
to perform actual logging. |
void |
clearModel()
Removes all the Events from the model |
void |
close()
Release any resources allocated within the appender such as file handles,
network connections, etc. |
ListModel |
getModel()
Returns a reference to the ListModel that contains all the LoggingEvents
that have been appended to this class. |
boolean |
requiresLayout()
Gets whether appender requires a layout. |
Methods inherited from class org.apache.log4j.AppenderSkeleton |
activateOptions, addFilter, clearFilters, doAppend, finalize, getErrorHandler, getFilter, getFirstFilter, getLayout, getName, getThreshold, isActive, isAsSevereAsThreshold, isAsSevereAsThreshold, isClosed, setErrorHandler, setLayout, setName, setThreshold |
ListModelAppender
public ListModelAppender()
- Constructs a ListModelAppender.
getModel
public final 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(LoggingEvent event)
- Description copied from class:
AppenderSkeleton
- Subclasses of
AppenderSkeleton
should implement this method
to perform actual logging. See also AppenderSkeleton.doAppend
method.
- Overrides:
append
in class AppenderSkeleton
close
public void close()
- Description copied from interface:
Appender
- Release any resources allocated within the appender such as file handles,
network connections, etc.
It is a programming error to append to a closed appender.
clearModel
public void clearModel()
- Removes all the Events from the model
requiresLayout
public boolean requiresLayout()
- Gets whether appender requires a layout.
- Returns:
- false
Copyright © 2000-2006 Apache Software Foundation.
Licensed under the Apache License, Version 2.0.