mirror of
https://github.com/weyne85/MIST.git
synced 2025-10-29 16:56:32 +00:00
Fix logger if debug module is sanitized.
This commit is contained in:
parent
f74c5b488a
commit
5fdaa269fd
18
mist.lua
18
mist.lua
@ -6417,15 +6417,19 @@ do -- mist.Logger scope
|
||||
text = text:gsub('$' .. index, value)
|
||||
end
|
||||
end
|
||||
local dInfo = debug.getinfo(3)
|
||||
local fName = dInfo.name
|
||||
-- local fsrc = dinfo.short_src
|
||||
--local fLine = dInfo.linedefined
|
||||
local cLine = dInfo.currentline
|
||||
if fName then
|
||||
if debug then
|
||||
local dInfo = debug.getinfo(3)
|
||||
local fName = dInfo.name
|
||||
local cLine = dInfo.currentline
|
||||
-- local fsrc = dinfo.short_src
|
||||
--local fLine = dInfo.linedefined
|
||||
end
|
||||
if fName and cLine then
|
||||
return fName .. '|' .. cLine .. ': ' .. text
|
||||
else
|
||||
elseif cLine then
|
||||
return cLine .. ': ' .. text
|
||||
else
|
||||
return ' ' .. text
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user