Class MemoryAppender

  • 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

    public class MemoryAppender
    extends ch.qos.logback.core.AppenderBase<ch.qos.logback.classic.spi.ILoggingEvent>
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static java.lang.String NAME  
      • 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
      MemoryAppender()  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      protected void append​(ch.qos.logback.classic.spi.ILoggingEvent event)  
      void clear()  
      void close()  
      java.util.List<ch.qos.logback.classic.spi.ILoggingEvent> getEvents()
      Retrieves the entire list of events
      java.util.List<ch.qos.logback.classic.spi.ILoggingEvent> getEvents​(int limit, java.lang.String logNameMatch, ch.qos.logback.classic.Level minSeverity)
      Retrieves the most recent events with the given filtering arguments applied.
      int getSize()  
      boolean requiresLayout()  
      void resize​(int newSize)  
      • 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 Detail

      • MemoryAppender

        public MemoryAppender()
    • Method Detail

      • append

        protected void append​(ch.qos.logback.classic.spi.ILoggingEvent event)
        Specified by:
        append in class ch.qos.logback.core.AppenderBase<ch.qos.logback.classic.spi.ILoggingEvent>
      • getEvents

        public java.util.List<ch.qos.logback.classic.spi.ILoggingEvent> getEvents()
        Retrieves the entire list of events
      • getEvents

        public java.util.List<ch.qos.logback.classic.spi.ILoggingEvent> getEvents​(int limit,
                                                                                  java.lang.String logNameMatch,
                                                                                  ch.qos.logback.classic.Level minSeverity)
        Retrieves the most recent events with the given filtering arguments applied.
        Parameters:
        limit - Up to this many events will be returned.
        logNameMatch - if non-null/non-empty, the event's logger name must contain this text (case insensitive) in order to match.
        minSeverity - Only events with the given severity level or greater will be returned.
      • resize

        public void resize​(int newSize)
      • clear

        public void clear()
      • getSize

        public int getSize()
      • close

        public void close()
      • requiresLayout

        public boolean requiresLayout()