This commit is contained in:
2020-07-14 22:04:03 +08:00
parent e54411e2c2
commit a47cabede2
119 changed files with 5115 additions and 1061 deletions

View File

@@ -1,36 +1,14 @@
-- 日志监听
do
KKLogListener = {}
KKLogListener = {}
function KKLogListener.OnLogError(log)
-- 当有异常日志时
if KKWhiteList and KKWhiteList.isWhiteName() then
if CLAlert.self ~= nil then
alertInfo("有异常日志,请在屏幕画圈查看详细!", Color.red, 3, 4)
end
end
-- 记录到服务器
if __recodeErrorLog__ then
if
(not startswith(log.condition, "get attr is nil")) and
(not startswith(log.condition, "Releasing render texture that is set as Camera")) and
(not startswith(log.condition, "Billing disabled")) and
(not startswith(log.condition, "propNames is null")) and
(not string.find(log.condition, "/KokManagement/ErrorServlet"))
then
local url = joinStr(__httpBaseUrl3, "/KokManagement/ErrorServlet")
local formData = Hashtable()
formData:Add("errorKey", joinStr(log.condition, "\n", log.stacktrace))
WWWEx.post(url, formData, CLAssetType.text, nil, nil, nil, true)
end
end
end
function KKLogListener.OnLogWarning(log)
-- 当有警告日志时
end
--------------------------------------------
return KKLogListener
function KKLogListener.OnLogError(log)
-- 当有异常日志时
MyUtl.toastE("有异常日志,请在屏幕画圈查看详细!")
end
function KKLogListener.OnLogWarning(log)
-- 当有警告日志时
end
--------------------------------------------
return KKLogListener