內容簡介
外掛將設定一個定時排程工作,當除錯日誌文件的大小達到一定值(預設為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>
外掛標籤
開發者團隊
原文外掛簡介
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.
