jiordiviera/laravel-log-cleaner
Laravel Log Cleaner helps you purge old Laravel log files automatically. Configure retention rules and schedule cleanup via Artisan/cron to keep storage tidy, prevent large logs, and reduce disk usage with minimal setup.
--level=ERROR).--backup).Adopt if:
Look elsewhere if:
logrotate).For Executives:
"This package automates log cleanup in our Laravel apps, saving storage costs and reducing manual DevOps overhead. With configurable retention policies (e.g., purge logs older than 30 days), we can enforce compliance while keeping critical error logs. It’s a lightweight, open-source solution that integrates seamlessly with our existing CI/CD pipelines—no third-party dependencies or upfront costs. For example, we can schedule php artisan log:clear --days=30 --backup post-deploy to keep storage lean without losing audit trails."
For Engineering Teams: *"Laravel Log Cleaner replaces ad-hoc log deletion with a safe, configurable, and efficient Artisan command. Key benefits:
--level=ERROR).--dry-run), backups (--backup), and compression (--compress) prevent accidental data loss.LogCleaner::clearOld(30)) let us integrate cleanup into custom workflows.php artisan log:clear."*For DevOps/SREs: *"This tool standardizes log management across environments and reduces toil:
--compress) or delete them entirely, cutting cloud storage costs.--level=ERROR).--backup) retain logs for forensic analysis if needed."*How can I help you explore Laravel packages today?