FileLog::find()

Return lines from the end of the log file, with various options

Usage

// basic usage
$int = $fileLog->find();

// usage with all arguments
$int = $fileLog->find(int $limit = 100, int $pageNum = 1, array $options = []);

Arguments

NameType(s)Description
$limit (optional)int

Number of items to return (per pagination), or 0 for no limit.

$pageNum (optional)int

Current pagination Default:1

$options (optional)array

Return value

int array

of strings (associative), each indexed by string containing slash separated numeric values of: "current/total/start/end/total" which is useful with pagination. If the 'toFile' option is used, then return value is instead an integer qty of lines written.

Exceptions

Method can throw exceptions on error:

  • \Exception - on fatal error


FileLog methods and properties

API reference based on ProcessWire core version 3.0.251