forked from mirror/MCSManager
新增 - 输出最大阈值限制
This commit is contained in:
parent
55c5c55a71
commit
ca9fe58db0
@ -106,6 +106,12 @@ setInterval(() => {
|
||||
let data = consoleBuffer[serverName];
|
||||
//忽略极小体积数据
|
||||
if (!data || data.length <= 1) continue;
|
||||
//忽略极大体积数据
|
||||
const MAX_OUT_LEN = 1024 * 30;
|
||||
if (data.length > MAX_OUT_LEN) {
|
||||
data = data.slice(0, MAX_OUT_LEN) +
|
||||
"\n - 更多的此刻输出已经忽略...\n"
|
||||
}
|
||||
// 替换元素
|
||||
let htmlData = data.replace(/\n/gim, '<br />');
|
||||
//刷新每个服务器的缓冲数据
|
||||
|
Loading…
Reference in New Issue
Block a user