pawelt / logcleaner
There is no license information available for the latest version (1.0.0) of this package.
Module that helps with logs cleaning.
1.0.0
2023-12-16 16:01 UTC
Requires (Dev)
- mikey179/vfsstream: ^1.6
- phpunit/phpunit: ^10.5
This package is not auto-updated.
Last update: 2025-04-20 20:38:23 UTC
README
Simple solution, made for easy old logs cleanup.
Installation
Instalation is simple. Just get install composer dependency:
$ composer require pawelt/logcleaner
And inside project:
<?php
use LogCleaner\LogCleanerContext;
use LogCleaner\Strategy\DTO\FileCleanerStrategyDTO;
use LogCleaner\Strategy\FileCleanerStrategy;
...
// For example
$logCleaner = new LogCleanerContext(new FileCleanerStrategy());
$dto = new FileCleanerStrategyDTO();
$dto->setPath('path/to/log');
$dto->setTimePeriod(3);
$logCleaner->clean($dto);