uipps/laravel-log-clear

laravel artisan log clear

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

This package is auto-updated.

Last update: 2024-09-30 01:30:56 UTC


README

laravel artisan log clear.

它是如何工作的?

此包期望您正在使用 Laravel 5.1 或更高版本。您需要通过 composer 导入 uipps/laravel-log-clear

配置

composer require uipps/laravel-log-clear

您也可以直接传递选项。

  • --keepfiles=2
  • --dry-run

使用方法

假设您已经配置了数据库,现在您可以开始使用了。

  • 让我们从默认连接生成一些模型。
// 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