Skip to content

Enhancement Request: Module CheckLogFile, Limit lines/read lines backwards from end of file #583

@twilson-asg

Description

@twilson-asg

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.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions