fix debug on/off toggle
This commit is contained in:
1 parent
974927db54
commit
0cdc5b64f4
1 file changed
+5
-5
+5
-5
@@ -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
|
||||
Reference in new issue
Block a user