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

    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 © 2013 The Apache Software Foundation. Licensed under the Apache License, Version 2.0

Apache Extras for Apache log4j, Apache log4j and Apache are trademarks of the Apache Software Foundation.