Download the PHP package jiordiviera/laravel-log-cleaner without Composer
On this page you can find all versions of the php package jiordiviera/laravel-log-cleaner. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download jiordiviera/laravel-log-cleaner
More information about jiordiviera/laravel-log-cleaner
Files in jiordiviera/laravel-log-cleaner
Package laravel-log-cleaner
Short Description A Laravel package to easily clean the log files.
License MIT
Informations about the package laravel-log-cleaner
Laravel Log Cleaner
Laravel Log Cleaner is a simple package that allows you to clear the content of the laravel.log
file using an
Artisan command. This package is compatible with Laravel versions 7, 8, 9, 10, and 11.
Installation
Install the package via Composer by running:
Compatibility
- Laravel 7.x
- Laravel 8.x
- Laravel 9.x
- Laravel 10.x
- Laravel 11.x
Usage
This package adds an Artisan command to clear the content of the laravel.log
file. There are two ways to use this
command:
-
To clear all logs:
- To clear logs older than a specified number of days:
Replace 30
with the number of days you want to keep. This will remove all log entries older than the specified number
of days.
Examples
Clear all logs:
Clear logs older than 30 days:
Configuration
No additional configuration is required. Once the package is installed, the log:clear
command is ready to use.
Running Tests
This package uses Pest for testing. To run the tests, use:
Ensure your tests are correctly defined in the tests/
directory.
Contributing
Contributions are welcome! Feel free to submit Issues or Pull Requests via GitHub.
Development Workflow
If you want to contribute:
-
Clone the repository:
-
Install dependencies:
- Run tests:
About
This package was developed to simplify log file management in Laravel projects. Instead of manually clearing the logs, you can now achieve it with a single command, with the option to selectively remove older logs.
License
The Laravel Log Cleaner package is open-source software licensed under the MIT License.
Note: Although this package was initially developed with Laravel 11, it is also compatible with earlier versions of Laravel (7, 8, 9, and 10).
For more information, visit the GitHub repository.
All versions of laravel-log-cleaner with dependencies
illuminate/support Version ^7.0|^8.0|^9.0|^10.0|^11.0
illuminate/console Version ^7.0|^8.0|^9.0|^10.0|^11.0