fix debug on/off toggle

pull/346/head
chrox 11 years ago
parent 974927db54
commit 0cdc5b64f4

@ -19,12 +19,8 @@ local function LvDEBUG(lv, ...)
print("#"..line)
end
local function DEBUGBT()
DEBUG(debug.traceback())
end
function Dbg_mt.__call(dbg, ...)
LvDEBUG(math.huge, ...)
if dbg.is_on then LvDEBUG(math.huge, ...) end
end
function Dbg:turnOn()
@ -42,6 +38,10 @@ function Dbg:logEv(ev)
self.ev_log:flush()
end
function Dbg:traceback()
LvDEBUG(math.huge, debug.traceback())
end
setmetatable(Dbg, Dbg_mt)
return Dbg

Loading…
Cancel
Save