--输出日志--
function Log(str)
if LogModeLevel == 0 then
Util.Log(debug.traceback(str))
end
end
--警告日志--
function LogWarn(str)
if LogModeLevel >= 0 and LogModeLevel <= 1 then
Util.LogWarning(debug.traceback(str))
end
end
--错误日志--
function LogError(str)
if LogModeLevel <= 2 and LogModeLevel >= 0 then
Util.LogError(debug.traceback(str))
end
end
-- 有颜色的log可自定义
--
function LogRed( str )
Log(""..str.."")
end
function LogGreen( str )
Log(""..str.."")
end
function LogBlue( str )
Log(""..str.."")
end
--带有颜色的打印 只支持2 4参数个数("red","") ("red","","#FFFFFF","")
function LogColor(...)
local args={...}
if #args==2 then
Log(""..args[2].."")
elseif #args==4 then
Log(""..args[2].."".." "..args[4].."")
end
end