mirror of
https://github.com/koreader/koreader.git
synced 2025-08-10 00:52:38 +00:00
fix debug on/off toggle
This commit is contained in:
@@ -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