Plugin Details
Home / Plug-in market / Log Cleaner
Log Cleaner
Directly fixes the ever-growing storage/logs/laravel.log: takes over logging at runtime (daily rotation + level filter + automatic retention), enforces per-file and total-directory size limits (oversized files are truncated keeping the tail), and adds an admin page with usage overview, one-click / preview cleanup, per-file download-truncate-delete and a one-click .env writer with automatic backup. All times and log rotation use China time (Asia/Shanghai, UTC+8): file timestamps, cleanup records, the truncation notice line, the daily 03:20 scheduled run, and the taken-over log file names and line timestamps never end up 8 hours off when the site timezone is UTC
View more
0 Downloads
24 Views
2026-10-08 Last Update
$2.93
$4.40
One-time purchase for lifetime use, with 1 months of technical support included
Plugin Purchase Process
1
Access your BeikeShop admin dashboard
2
Click on "Plugin Marketing" in the top right corner
3
Select the desired plugin for purchase
4
Click on Purchase
Plugin Description
Log Cleaner
Keep the ever-growing logs within the set range: split by day, limit levels, and automatically delete expired files.
"## Function
- ** Runtime takeover log writing ** : No need to modify '.env '. After installation, switch to daily splitting and apply the set record level and retention days.
- ** Automatic deletion for retention days ** : Log files that exceed the set number of days will be automatically cleared.
- ** Single file size guarantee ** : When a single file exceeds the upper limit, only the most recent content at the end is retained, and a truncation statement is written at the beginning of the file.
- ** Directory total guarantee ** : When the entire log directory exceeds the total upper limit, the cleanup starts from the oldest log file.
- ** Automatic Cleaning ** : It is executed once at intervals (default 1 day) after the request ends, without occupying page response time. When the server is configured with scheduled tasks, it will be cleaned up again at 03:20 every day.
- ** Usage Overview and Cleanup Preview ** : Display directory usage, number of files, current effective policies, and the last automatic cleanup time; The "Preview Cleanup Plan" only lists which files will be processed and does not delete anything.
- ** Single file operation ** : View the tail, download, truncate (retain the tail), delete.
- ** Unify China Time Zone ** : File time, cleaning records, truncation instructions, and log file names and inline times are all displayed in China time Zone.
- ** All pop-up Windows use SweetAlert2** : When clearing, deleting, truncating, or writing to '.env ', a SweetAlert2 confirmation box will pop up (use a red confirmation button for deletion and clearing, with the default focus stopping at "Cancel"). The execution result will be indicated by a toast in the upper right corner, reducing the risk of incorrect clicks.
Use
- Go to the left side of the backend and select "Functions → Logs". At the top of the page, you can see the usage of the log directory, the number of files, and the current effective policy.
- Click "Preview Cleanup Plan" to confirm which files will be deleted or truncated, and then click "Clean Now" to execute.
- In the file list, for a single file, click "View End", "Download", "Truncate" or "Delete".
- When you need to clear the entire directory, click "Clear All Logs". This operation is irreversible and a confirmation will pop up first.
- When the current strategy needs to be solidified to the '.env 'point, "Write the suggested configuration to.env", an automatic backup will be made before writing.
- The strategy itself is adjusted in ** Plugin Management → Log Cleaning → Editing **.
! [ScreenShot_2026-10-08_125732_799.png](https://beikeshop.cn/storage/plugins/20261008/8SqAHQOjtHmnAQaJuVoulErTLeimG36 0hCJaTfWS.png)