uipps/laravel-log-clear

A laravel artisan log clear

v1.0.3 2022-04-02 05:24 UTC

This package is auto-updated.

Last update: 2025-06-29 01:59:52 UTC


README

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