Download the PHP package pfrug/clear-logs without Composer
On this page you can find all versions of the php package pfrug/clear-logs. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Table of contents
Download pfrug/clear-logs
More information about pfrug/clear-logs
Files in pfrug/clear-logs
Download pfrug/clear-logs
More information about pfrug/clear-logs
Files in pfrug/clear-logs
Vendor pfrug
Package clear-logs
Short Description Smart cleanup of Laravel logs by file or content date.
License MIT
Package clear-logs
Short Description Smart cleanup of Laravel logs by file or content date.
License MIT
Please rate this library. Is it a good library?
Informations about the package clear-logs
ClearLogs
Artisan command to clean up Laravel log files, with support for both single
and daily
log channels.
It preserves logs from the last N days, configurable by content date or file modification time.
Features
- Works with
single
anddaily
log channels - Retains logs by configurable number of days
- Detects dates from log content, not just filenames
- Supports
--dry-run
mode (preview changes) - Optional file name or mtime-based cleanup for daily logs
- Clean truncation of large single log files by full log blocks
Installation
Install the package via Composer:
Optional: Publish configuration
This will publish config/clearlogs.php
.
Configuration file options
Usage
Run the command manually:
Or preview the result without modifying files:
Override the number of days on the fly:
Scheduler Integration
To run daily, register the command in your scheduled tasks (app/Console/Kernel.php
):
Supported Channels
single
: The defaultlaravel.log
file is parsed and truncated. Only complete log blocks newer than the cutoff are retained.daily
: Individuallaravel-YYYY-MM-DD.log
files are deleted if older than the configured threshold.
License
MIT © P. Frugone
All versions of clear-logs with dependencies
PHP Build Version
Package Version
No informations.
The package pfrug/clear-logs contains the following files
Loading the files please wait ....