Interface LogReader

All Superinterfaces:
Iterator<LogRecord>
All Known Implementing Classes:
AbstractLogReader, FileLogReader, MultipleFileLogReader

public interface LogReader extends Iterator<LogRecord>
Log reader interface
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    Destroy the log reader and release all used resources.
    ch.qos.logback.core.Appender<?>
    Logging appender associated with this reader.
    End (latest) date of of the log records returned by this log reader.
    Level of the log records returned by this log reader.
    int
    Max.
    Max (latest) available date of the log records.
    Min (earliest) available date of the log records.
    int
    Index of the first record returned by this log reader.
    Start (earliest) date of the log records returned by this log reader.
    Thread name of the log records returned by this log reader.
    All available thread names of the log records.
    void
    Initialize the log reader.
    boolean
    Check if more records are available after limit is reached.
    void
    setAppender(ch.qos.logback.core.Appender<?> appender)
    Logging appender associated with this reader.
    void
    End (latest) date of of the log records returned by this log reader.
    void
    Level of the log records returned by this log reader.
    void
    setLimit(int limit)
    Max.
    void
    setOffset(int offset)
    Index of the first record returned by this log reader.
    void
    Start (earliest) date of the log records returned by this log reader.
    void
    setThread(String threadname)
    Thread name of the log records returned by this log reader.
    boolean
    Test if this LogReader implementation supports date-based records filtering.
    boolean
    Test if this LogReader implementation supports level-based records filtering.
    boolean
    Test if this LogReader implementation supports thread-based records filtering.

    Methods inherited from interface java.util.Iterator

    forEachRemaining, hasNext, next, remove
  • Method Details

    • init

      void init() throws Exception
      Initialize the log reader.
      Throws:
      Exception
    • destroy

      void destroy() throws Exception
      Destroy the log reader and release all used resources.
      Throws:
      Exception
    • setAppender

      void setAppender(ch.qos.logback.core.Appender<?> appender)
      Logging appender associated with this reader.
      Parameters:
      appender - logging appender associated with this reader
    • getAppender

      ch.qos.logback.core.Appender<?> getAppender()
      Logging appender associated with this reader.
      Returns:
      logging appender associated with this reader.
    • setLimit

      void setLimit(int limit)
      Max. number of records returned by this log reader. Zero value (default) indicates no limit.
      Parameters:
      limit - max. number of records returned by this log reader.
    • getLimit

      int getLimit()
      Max. number of records returned by this log reader.
      Returns:
      max. number of records returned by this log reader or zero value if no limit has been set.
    • isMoreAvailable

      boolean isMoreAvailable()
      Check if more records are available after limit is reached.
      Returns:
      true if more records are available
    • setOffset

      void setOffset(int offset)
      Index of the first record returned by this log reader.
      Parameters:
      offset - index of the first record returned by this log reader.
    • getOffset

      int getOffset()
      Index of the first record returned by this log reader.
      Returns:
      index of the first record returned by this log reader.
    • supportsLevelFilter

      boolean supportsLevelFilter()
      Test if this LogReader implementation supports level-based records filtering.
      Returns:
      true if level filtering is supported.
    • setLevel

      void setLevel(LogLevel level)
      Level of the log records returned by this log reader.
      Parameters:
      level - log level
    • getLevel

      LogLevel getLevel()
      Level of the log records returned by this log reader.
      Returns:
      Level of the log records returned by this log reader or 'null' if no level filter has been set.
    • supportsThreadFilter

      boolean supportsThreadFilter()
      Test if this LogReader implementation supports thread-based records filtering.
      Returns:
      true if thread filtering is supported.
    • setThread

      void setThread(String threadname)
      Thread name of the log records returned by this log reader.
      Parameters:
      threadname - thread name
    • getThread

      String getThread()
      Thread name of the log records returned by this log reader.
      Returns:
      thread name of the log records returned by this log reader or 'null' if no thread filter has been set.
    • getThreadNames

      List<String> getThreadNames()
      All available thread names of the log records.
      Returns:
      a List of thread names of the log records.
    • supportsDateRanges

      boolean supportsDateRanges()
      Test if this LogReader implementation supports date-based records filtering.
      Returns:
      true if date filtering is supported
    • setStartDate

      void setStartDate(Date date)
      Start (earliest) date of the log records returned by this log reader.
    • getStartDate

      Date getStartDate()
      Start (earliest) date of the log records returned by this log reader.
      Returns:
      Start date of the log records or 'null' if no start date has been set
    • setEndDate

      void setEndDate(Date date)
      End (latest) date of of the log records returned by this log reader.
      Parameters:
      date - end date
    • getEndDate

      Date getEndDate()
      End (latest) date of of the log records returned by this log reader.
      Returns:
      End date of the log records or 'null' if no end date has been set
    • getMinDate

      Date getMinDate()
      Min (earliest) available date of the log records.
      Returns:
      minimum date
    • getMaxDate

      Date getMaxDate()
      Max (latest) available date of the log records.
      Returns:
      maximum date