mirror of https://github.com/axmolengine/axmol.git
Merge pull request #2468 from dumganhar/master
[HelloLua] print ~> cclog
This commit is contained in:
commit
eeb1965710
|
@ -1,9 +1,14 @@
|
|||
-- cclog
|
||||
cclog = function(...)
|
||||
print(string.format(...))
|
||||
end
|
||||
|
||||
-- for CCLuaEngine traceback
|
||||
function __G__TRACKBACK__(msg)
|
||||
print("----------------------------------------")
|
||||
print("LUA ERROR: " .. tostring(msg) .. "\n")
|
||||
print(debug.traceback())
|
||||
print("----------------------------------------")
|
||||
cclog("----------------------------------------")
|
||||
cclog("LUA ERROR: " .. tostring(msg) .. "\n")
|
||||
cclog(debug.traceback())
|
||||
cclog("----------------------------------------")
|
||||
end
|
||||
|
||||
local function main()
|
||||
|
@ -12,7 +17,7 @@ local function main()
|
|||
collectgarbage("setstepmul", 5000)
|
||||
|
||||
require "hello2"
|
||||
print("result is " .. myadd(1, 1))
|
||||
cclog("result is " .. myadd(1, 1))
|
||||
|
||||
---------------
|
||||
|
||||
|
|
Loading…
Reference in New Issue