- Support reading slowly written multi-line logs, by retaining logs that are apparently complete (they match the given pattern) but could be completed by upcoming log lines.
- Avoid reading already read data (sometimes the underlying watcher reports wrong stats, overlapping ranges).
- Support reading logs whose lines are not completely written at the time the watcher reports a change in the file.
LogWatcherclass watches a log file to read new logged entries and, optionally parse each entry according to a given pattern. This class emits events with the parsed log entries.LogReaderis a helper class that usesLogWatcherto watch log files, internally storing new log entries, and provides a method that wait for the existence of a log entry that matches a given template.- The
resiliencemodule provides a set of functions that allow to test the behaviour of a SUT when logging under unfavorable conditions.