Interface LogEntryMatcher

All Superinterfaces:
Serializable
All Known Subinterfaces:
ClientLogEntryMatcherCallback, StreamLogEntryMatcher
All Known Implementing Classes:
AfterEntryLogEntryMatcher, AfterTimeLogEntryMatcher, AllLogEntryMatcher, BeforeEntryLogEntryMatcher, BeforeTimeLogEntryMatcher, ContainsStringLogEntryMatcher, ContinuousLogEntryMatcher, FirstFileLogEntryMatcher, ForwardChunkLogEntryMatcher, LastNLogEntryMatcher, LogEntryMatcherFilter, NoneLogEntryMatcher, RegexLogEntryMatcher, ReverseLogEntryMatcher, SameFileLogEntryMatcher, SizeLogEntryMatcher

public interface LogEntryMatcher extends Serializable
A matcher allowing to control the traversal of the log file. Also accumulates the required log entries to be processed in order to return them.
Author:
kimchy
  • Method Details

    • initialize

      void initialize(LogEntryMatcher.InitializationContext context) throws IOException
      Called on the loggable component side (server) before starting to traverse the log file.
      Throws:
      IOException
    • entries

      List<LogEntry> entries()
      Returns all the relevant entries this matcher accumulated.

      Note, for ease of use in implementing the matcher, the entries are assumed to be from newest to oldest (if the matcher value order).

    • match

      Controls if the traversal of the log file should continue, or break. If it should break, then all the entries() accumulated will be returned.