laravel-log-clear maintained by uipps
log clear for laravel artisan
A laravel artisan log clear.
How does it work?
This package expects that you are using Laravel 5.1 or above.
You will need to import the uipps/laravel-log-clear package via composer:
Configuration
composer require uipps/laravel-log-clear
You can also pass options directly.
--keepfiles=2--dry-run
Usage
Assuming you have already configured your database, you are now all set to go.
- Let's scaffold some of your models from your default connection.
// delete all log files
php artisan log:clear
// full params
php artisan log:clear -k 2 -d
// Get info about the command and options
php artisan log:clear --help
// Pass the number of files to keep when deleting old log files. Overrides the config setting.
// This overrides the default set in config
php artisan log:clear --keepfiles=8
// Run without actually deleting any files
php artisan log:clear --dry-run
//
php artisan log:clear --dry-run --keepfiles=8