Return array of all logs, sorted by name
Each item in returned array is an associative array that includes the following:
name
(string): Name of log file, excluding extension.file
(string): Full path and filename of log file.size
(int): Size in bytesmodified
(int): Last modified date (unix timestamp)
Usage
// basic usage
$array = $log->getLogs();
// usage with all arguments
$array = $log->getLogs(bool $sortNewest = false);
Arguments
Name | Type(s) | Description |
---|---|---|
sortNewest (optional) | bool | Sort by newest to oldest rather than by name? (default=false) Added 3.0.143 |
Return value
array
Indexed by log name
API reference based on ProcessWire core version 3.0.236