|
发表于 2019-9-22 00:10:02
|
显示全部楼层
本帖最后由 imgxx@tj 于 2019-9-22 00:21 编辑
你是指 每次记录的文件太大么 ?
看了下代码,
function scrLog()
local filename = GetInfo (67) .. "logs\\" .. score.id .. '发呆'..os.date("%Y%m%d_%H时%M分%S秒") .. ".log"
local file = io.open(filename,"w")
local t = {}
for i = 1,GetLinesInBufferCount() do
table.insert(t,GetLineInfo(i,1))
end
local s = table.concat(t,"\n") .. "\n"
file:write(s)
file:close()
end
记录的文件大小应该是 由 GetLinesInBufferCount() 这个函数决定。
这个函数是 mush 的脚本函数,返回输出缓存的值,所以如果要将这个文件变小,应该调整 mush的输出窗口缓存条数就可以了。
|
|