This is an enhancement request for the Module CheckLogFile. Because of their use together, the features requested here have been combined into this one ticket:
Feature: Argument to limit the number of lines read from the log file when checked.
It would be useful to be able to read a fixed number of latest-written lines from a log file, rather than only all lines (read entire file setting) or all lines written since the last check (the default, but see #582).
Feature: Argument whether to read the file from the start and read forwards (current default), or the end and read backwards.
Some logfiles are updated such that the entire file is written each time, and newer lines are written at the top (start) of the file, rather than additional data appended to the end. Admittedly, this is quite unusual for machine-written logs, but is more common for human-written files e.g. changelogs in an automation or deployment setting.
It probably doesn't make much sense to read backwards when the index isn't at the start of the file anyway, so this probably only applies when all lines (read entire file set to true) are being read.
This is an enhancement request for the Module
CheckLogFile. Because of their use together, the features requested here have been combined into this one ticket:Feature: Argument to limit the number of lines read from the log file when checked.
It would be useful to be able to read a fixed number of latest-written lines from a log file, rather than only all lines (
read entire filesetting) or all lines written since the last check (the default, but see #582).Feature: Argument whether to read the file from the start and read forwards (current default), or the end and read backwards.
Some logfiles are updated such that the entire file is written each time, and newer lines are written at the top (start) of the file, rather than additional data appended to the end. Admittedly, this is quite unusual for machine-written logs, but is more common for human-written files e.g. changelogs in an automation or deployment setting.
It probably doesn't make much sense to read backwards when the index isn't at the start of the file anyway, so this probably only applies when all lines (
read entire fileset to true) are being read.