FileLog::find() method

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


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

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


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.


Method can throw exceptions on error:

  • \Exception - on fatal error

FileLog methods and properties

API reference based on ProcessWire core version 3.0.228

Latest news

  • ProcessWire Weekly #499
    In the 499th issue of ProcessWire Weekly we'll check out the latest weekly update from Ryan, introduce a new third party module called RockPdf, and more. Read on! / 3 December 2023
  • Using date range fields in ProcessWire
    This week we'll take a detailed look at the newest addition to the ProFields set of modules: the Date Range Fieldtype and Inputfield.
    Blog / 24 November 2023
  • Subscribe to weekly ProcessWire news

“I am currently managing a ProcessWire site with 2 million+ pages. It’s admirably fast, and much, much faster than any other CMS we tested.” —Nickie, Web developer