Return given number of entries from end of log file, with each entry as an associative array of components
This is effectively the same as the getLines()
method except that each entry is an associative array rather than a single line (string). This method is pagination aware.
Usage
// basic usage
$array = $log->getEntries(string $name);
// usage with all arguments
$array = $log->getEntries(string $name, array $options = []);
Arguments
Name | Type(s) | Description |
---|---|---|
name | string | Name of log file (excluding extension) |
options (optional) | array | Optional options to modify default behavior:
|
Return value
array
Returns an array of associative arrays, each with the following components:
date
(string): ISO-8601 date stringuser
(string): user name or boolean false if unknownurl
(string): full URL or boolean false if unknowntext
(string): text of the log entry
See Also
API reference based on ProcessWire core version 3.0.236