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.AppenderSkeleton

  A very basic appender that takes the events and stores them in to a ListModel for late retrieval.
  Author:
    Paul Smith (psmith@apache.org)

- - ### Field Summary

    - ### Fields inherited from class org.apache.log4j.AppenderSkeleton

      `closed, errorHandler, headFilter, layout, name, tailFilter, threshold`

  - ### Constructor Summary

    Constructors
    Constructor | Description
    --- | ---
    `ListModelAppender()` | Constructs a ListModelAppender.

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `protected void` | `append​(org.apache.log4j.spi.LoggingEvent event)`
    `void` | `clearModel()` | Removes all the Events from the model.
    `void` | `close()`
    `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.
    `boolean` | `requiresLayout()`

    - ### Methods inherited from class org.apache.log4j.AppenderSkeleton

      `activateOptions, addFilter, clearFilters, doAppend, finalize, getErrorHandler, getFilter, getFirstFilter, getLayout, getName, getThreshold, isAsSevereAsThreshold, setErrorHandler, setLayout, setName, setThreshold`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### ListModelAppender

          public ListModelAppender()

      Constructs a ListModelAppender.

  - ### 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:
        `append` in class `org.apache.log4j.AppenderSkeleton`

    - #### close

          public void close()

    - #### clearModel

          public void clearModel()

      Removes all the Events from the model.

    - #### requiresLayout

          public boolean requiresLayout()