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:
18
mist.lua
18
mist.lua
@@ -6417,15 +6417,19 @@ do -- mist.Logger scope
|
|||||||
text = text:gsub('$' .. index, value)
|
text = text:gsub('$' .. index, value)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
local dInfo = debug.getinfo(3)
|
if debug then
|
||||||
local fName = dInfo.name
|
local dInfo = debug.getinfo(3)
|
||||||
-- local fsrc = dinfo.short_src
|
local fName = dInfo.name
|
||||||
--local fLine = dInfo.linedefined
|
local cLine = dInfo.currentline
|
||||||
local cLine = dInfo.currentline
|
-- local fsrc = dinfo.short_src
|
||||||
if fName then
|
--local fLine = dInfo.linedefined
|
||||||
|
end
|
||||||
|
if fName and cLine then
|
||||||
return fName .. '|' .. cLine .. ': ' .. text
|
return fName .. '|' .. cLine .. ': ' .. text
|
||||||
else
|
elseif cLine then
|
||||||
return cLine .. ': ' .. text
|
return cLine .. ': ' .. text
|
||||||
|
else
|
||||||
|
return ' ' .. text
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user