$logprune()

Prune log file to contain only entries from last [n] days

Usage

$int = $log->prune(string $name, int $days);

Arguments

NameType(s)Description
$namestring

Name of log file, excluding path and extension.

$daysint

Number of days

Return value

int

Number of items in newly pruned log file or boolean false on failure

Exceptions

Method can throw exceptions on error:

  • WireException


$log methods and properties

API reference based on ProcessWire core version 3.0.251