Fix logger if debug module is sanitized.

This commit is contained in:
Lukas Kropatschek 2016-03-05 13:24:48 +01:00
parent f74c5b488a
commit 5fdaa269fd

View File

@ -6417,15 +6417,19 @@ do -- mist.Logger scope
text = text:gsub('$' .. index, value)
end
end
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
local cLine = dInfo.currentline
if fName then
end
if fName and cLine then
return fName .. '|' .. cLine .. ': ' .. text
else
elseif cLine then
return cLine .. ': ' .. text
else
return ' ' .. text
end
end