添加log模块,用于代替之前缺少音频文件弹出的消息框

也给缺少图片和加载错误语言等地方添加了日志
控制台添加log命令输出日志
This commit is contained in:
MrZ626
2021-09-22 09:30:18 +08:00
parent 48c9bd6dfd
commit 56cbe4c5b6
8 changed files with 52 additions and 9 deletions

19
Zframework/log.lua Normal file
View File

@@ -0,0 +1,19 @@
local ins=table.insert
local logs={os.date("Techmino logs %Y/%m/%d %A")}
local function log(message)
ins(logs,os.date("%H:%M:%S")..message)
end
local LOG=setmetatable({logs=logs},{
__call=function(_,message)
log(message)
end
})
function LOG.read()
return table.concat(logs,"\n")
end
return LOG