org.eclipse.rdf4j.common.logging

## Interface LogReader

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

      public interface LogReader
      extends Iterator<LogRecord>

  Log reader interface

- - ### Method Summary

    All Methods Instance Methods Abstract Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `destroy()` Destroy the log reader and release all used resources.
    `ch.qos.logback.core.Appender<?>` | `getAppender()` Logging appender associated with this reader.
    `Date` | `getEndDate()` End (latest) date of of the log records returned by this log reader.
    `LogLevel` | `getLevel()` Level of the log records returned by this log reader.
    `int` | `getLimit()` Max.
    `Date` | `getMaxDate()` Max (latest) available date of the log records.
    `Date` | `getMinDate()` Min (earliest) available date of the log records.
    `int` | `getOffset()` Index of the first record returned by this log reader.
    `Date` | `getStartDate()` Start (earliest) date of the log records returned by this log reader.
    `String` | `getThread()` Thread name of the log records returned by this log reader.
    `List<String>` | `getThreadNames()` All available thread names of the log records.
    `void` | `init()` Initialize the log reader.
    `boolean` | `isMoreAvailable()` 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` | `setEndDate(Date date)` End (latest) date of of the log records returned by this log reader.
    `void` | `setLevel(LogLevel level)` 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` | `setStartDate(Date date)` 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` | `supportsDateRanges()` Test if this LogReader implementation supports date-based records filtering.
    `boolean` | `supportsLevelFilter()` Test if this LogReader implementation supports level-based records filtering.
    `boolean` | `supportsThreadFilter()` Test if this LogReader implementation supports thread-based records filtering.

    - ### Methods inherited from interface java.util.Iterator

      `forEachRemaining, hasNext, next, remove`

- - ### Method Detail

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

Copyright © 2015-2020 Eclipse Foundation. All Rights Reserved.