dante / log-cleaner
Remove logs older than given date
1.0.0
2024-01-10 12:03 UTC
Requires
- symfony/console: ^7.0
Requires (Dev)
- mikey179/vfsstream: ^1.6
- phpunit/phpunit: ^10
This package is not auto-updated.
Last update: 2024-05-02 11:50:10 UTC
README
Installation
composer require dante/log-cleaner
Usage
./vendor/dante/log-cleaner --source {source} {older-than}
- {source} - "database" or "file"
Logs will be loaded from foobar.log
, where I included some example logs. All of them but one are older than 2022-01-01, so that could be a good example.
- {older-than} - date in YYYY-MM-DD format
Log format
In order to be properly parsed, logs have to follow this format:
YYYY-MM-DD: {text}
Testing
./vendor/bin/phpunit tests