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 and Description
    `ListModelAppender()` Constructs a ListModelAppender.

  - ### Method Summary

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

Copyright © 2002-2018 Apache Software Foundation. All Rights Reserved.
Apache Logging, Apache Log4j, Log4j, Apache Chainsaw, Chainsaw, Apache, the Apache feather logo, the Apache Logging project logo, and the Apache Log4j logo are trademarks of The Apache Software Foundation.