LogFilesService

Implements \LogFilesServiceInterface

Class LogFilesService

package

Default

Methods

LogFilesService constructor.

__construct(\IntType $thresholdAsDays, \ExistingDirectory $root, array $blacklist) 

Arguments

$thresholdAsDays

\IntType

Maximum age in days of logfile until it gets removed.

$root

\ExistingDirectory

Log files root directory.

$blacklist

array

List of blacklisted file names (e.g. .htaccess). Gets merged with "." and "..".

Returns the deleted log files.

deleteOldLogFiles() : array<mixed,string>

Response

array<mixed,string>

List of removed file names.

Properties