dainsys / clear-laravel-logs
Clear Laravel log files
2.3.0
2020-11-05 03:49 UTC
Requires
- php: >=7.0
- illuminate/console: ^5.7 || ^5.8 || ^6.0 || ^7.0
- illuminate/filesystem: ^5.7 || ^5.8 || ^6.0 || ^7.0
- illuminate/support: ^5.7 || ^5.8 || ^6.0 || ^7.0
Requires (Dev)
- mockery/mockery: ^1.0
- orchestra/testbench: ^5.4
- phpunit/phpunit: ^8.0
README
Allows to list or delete all laravel...log logs files
Installation
- Step 1: Add the following entry to your composer.json file:
"repositories": [ { "type": "git", "url": "https://github.com/Yismen/clear-laravel-logs.git" } ]
- Step 2: Run
composer require dainsys/clear-laravel-logs
command to install as a dependency - Step 3: The Package should be auto-discovered by Laravel. However, you could all register it in your config.app file within the providers array:
'providers' => [ Dainsys\ClearLogs\ClearLogsServiceProvider::class, ]
Ussage
- To just list the log files, run without any argument:
php artisan dainsys:laravel-logs
- To remove all existing log files, pass the --clear flag
php artisan dainsys:laravel-logs --clear
- By default, the last 8 files are keept. To override the number of files to preserve, update the --keep flag
php artisan dainsys:laravel-logs --clear --keep=0
- By default, the package search for any file starting with 'laravel-'. To override, pass the desired starting file name as an option
php artisan dainsys:laravel-logs new_file_name --clear