新增 - 限制大小规则配置

This commit is contained in:
suwings 2018-09-15 11:13:52 +08:00
parent ca9fe58db0
commit f36faca166
2 changed files with 9 additions and 4 deletions

View File

@ -48,9 +48,14 @@ MCSERVER.localProperty.ftp_start_port = 20010;
MCSERVER.localProperty.ftp_end_port = 20200;
//控制台实时刷新频率 单位毫秒 默认1200 毫秒
//建议在 1000 毫秒 与 3000 毫秒之选择
MCSERVER.localProperty.console_send_times = 1200;
//控制台实时刷新频率 单位毫秒 默认 1500 毫秒
//建议在 1000 毫秒 与 3000 毫秒之选择
MCSERVER.localProperty.console_send_times = 1500;
//控制台一次性发送的数据最大限制
//数据最大限制 单位KB | 默认 28 KB
MCSERVER.localProperty.console_max_out = 28;
//是否开启 gzip 静态文件压缩,但是如果你使用反向代理或某 HTTP 服务自带的gzip请关闭它

View File

@ -107,7 +107,7 @@ setInterval(() => {
//忽略极小体积数据
if (!data || data.length <= 1) continue;
//忽略极大体积数据
const MAX_OUT_LEN = 1024 * 30;
const MAX_OUT_LEN = 1024 * (MCSERVER.localProperty.console_max_out || 28);
if (data.length > MAX_OUT_LEN) {
data = data.slice(0, MAX_OUT_LEN) +
"\n - 更多的此刻输出已经忽略...\n"