mirror of
https://github.com/mrSkortch/MissionScriptingTools.git
synced 2025-08-15 10:47:23 +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)
|
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
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user