Class InMemoryAppender

java.lang.Object
ch.qos.logback.core.spi.ContextAwareBase
ch.qos.logback.core.AppenderBase<ch.qos.logback.classic.spi.ILoggingEvent>
org.kiwiproject.beta.test.logback.InMemoryAppender
All Implemented Interfaces:
ch.qos.logback.core.Appender<ch.qos.logback.classic.spi.ILoggingEvent>, ch.qos.logback.core.spi.ContextAware, ch.qos.logback.core.spi.FilterAttachable<ch.qos.logback.classic.spi.ILoggingEvent>, ch.qos.logback.core.spi.LifeCycle

@Beta @Deprecated(since="1.3.0", forRemoval=true) @KiwiDeprecated(removeAt="2.0.0", replacedBy="InMemoryAppender in kiwi-test 3.2.0", reference="https://github.com/sleberknight/kiwi-beta/issues/421") public class InMemoryAppender extends ch.qos.logback.core.AppenderBase<ch.qos.logback.classic.spi.ILoggingEvent>
Deprecated, for removal: This API element is subject to removal in a future version.
replaced by InMemoryAppender in kiwi-test 3.2.0. Will be removed in version 2.0.0.
A logback appender that stores logging events in an in-memory map.

This is for testing purposes only, and is not at all intended for production use!

  • Field Summary

    Fields inherited from class ch.qos.logback.core.AppenderBase

    name, started

    Fields inherited from class ch.qos.logback.core.spi.ContextAwareBase

    context
  • Constructor Summary

    Constructors
    Constructor
    Description
    Deprecated, for removal: This API element is subject to removal in a future version.
     
  • Method Summary

    Modifier and Type
    Method
    Description
    protected void
    append(ch.qos.logback.classic.spi.ILoggingEvent eventObject)
    Deprecated, for removal: This API element is subject to removal in a future version.
    void
    Deprecated, for removal: This API element is subject to removal in a future version.
    Clear all the events that are stored in-memory.
    Map<Integer,ch.qos.logback.classic.spi.ILoggingEvent>
    Deprecated, for removal: This API element is subject to removal in a future version.
    Return a copy of the internal event map.
    Deprecated, for removal: This API element is subject to removal in a future version.
    Return the logged messages.
    List<ch.qos.logback.classic.spi.ILoggingEvent>
    Deprecated, for removal: This API element is subject to removal in a future version.
    Return the logged ILoggingEvent instances.
    Stream<ch.qos.logback.classic.spi.ILoggingEvent>
    Deprecated, for removal: This API element is subject to removal in a future version.
    Return a stream containing the logged events.

    Methods inherited from class ch.qos.logback.core.AppenderBase

    addFilter, clearAllFilters, doAppend, getCopyOfAttachedFiltersList, getFilterChainDecision, getName, isStarted, setName, start, stop, toString

    Methods inherited from class ch.qos.logback.core.spi.ContextAwareBase

    addError, addError, addInfo, addInfo, addStatus, addWarn, addWarn, getContext, getDeclaredOrigin, getStatusManager, setContext

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

    Methods inherited from interface ch.qos.logback.core.spi.ContextAware

    addError, addError, addInfo, addInfo, addStatus, addWarn, addWarn, getContext, setContext
  • Constructor Details

    • InMemoryAppender

      public InMemoryAppender()
      Deprecated, for removal: This API element is subject to removal in a future version.
  • Method Details

    • append

      protected void append(ch.qos.logback.classic.spi.ILoggingEvent eventObject)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Specified by:
      append in class ch.qos.logback.core.AppenderBase<ch.qos.logback.classic.spi.ILoggingEvent>
    • clearEvents

      public void clearEvents()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Clear all the events that are stored in-memory.
    • getEventMap

      public Map<Integer,ch.qos.logback.classic.spi.ILoggingEvent> getEventMap()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Return a copy of the internal event map. The keys are the message order starting at one, and the values are the corresponding logging events.
      Returns:
      an unmodifiable copy of the event map
    • getOrderedEvents

      public List<ch.qos.logback.classic.spi.ILoggingEvent> getOrderedEvents()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Return the logged ILoggingEvent instances.
      Returns:
      a list containing the logged events
    • getOrderedEventMessages

      public List<String> getOrderedEventMessages()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Return the logged messages.
      Returns:
      a list containing the logged event messages
    • getOrderedEventStream

      public Stream<ch.qos.logback.classic.spi.ILoggingEvent> getOrderedEventStream()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Return a stream containing the logged events.
      Returns:
      a stream of the logged events