[WordPress] 外掛分享: AB Truncate Debug Log

首頁外掛目錄 › AB Truncate Debug Log
⚠ 此外掛已下架 — 不再更新維護,建議勿安裝。
全新外掛
安裝啟用
尚無評分
812 天前
最後更新
問題解決
WordPress 4.9.0+ PHP 7.4+ v1.0.0 上架:2023-12-26

內容簡介

外掛將設定一個定時排程工作,當除錯日誌文件的大小達到一定值(預設為10MB)時,會自動截斷該文件的行數(預設為5,000行)以防止其過大佔據伺服器空間。不需要使用者介入。
使用兩個篩選器可以改變預設值:

- ab_truncate_debug_log_max_size:改變除錯日誌文件的最大大小(以MB為單位)。
- ab_truncate_debug_log_lines:改變除錯日誌文件的截斷行數。

下面是製作一組問題與答案的HTML清單:
<ul>
<li>外掛的功能是什麼?</li>
<li>該外掛使用定時排程工作的方式來截斷何種文件?</li>
<li>當文件大小達到多少時,該外掛會截斷文件的行數?</li>
<li>該外掛如何避免除錯日誌文件變得過大?</li>
<li>有什麼方法可以改變除錯日誌文件的最大大小?</li>
<li>有什麼方法可以改變除錯日誌文件的截斷行數?</li>
</ul>

外掛標籤

開發者團隊

⬇ 下載最新版 (v1.0.0) 或搜尋安裝

① 下載 ZIP → 後台「外掛 › 安裝外掛 › 上傳外掛」
② 後台搜尋「AB Truncate Debug Log」→ 直接安裝(推薦)
📦 歷史版本下載

原文外掛簡介

This simple plugin schedules a cron job that will truncate the debug log file to a certain number of lines (default: 5,000 lines) after the file reaches a certain size (default: 10MB). No user interaction is required.
This is to prevent the debug log file from growing too large and taking up too much space on the server.
Two filters can be used to change the default values:

ab_truncate_debug_log_max_size to change the maximum size of the debug log file (in MB).
ab_truncate_debug_log_lines to change the number of lines the debug log file is truncated to.

延伸相關外掛

文章
Filter
Apply Filters
Mastodon