mirror of
https://github.com/Doodle3D/doodle3d-firmware.git
synced 2024-12-22 19:13:49 +01:00
Logger now flushes buffer to have log file update immediately.
This commit is contained in:
parent
1d9801b314
commit
f7dc891c97
@ -35,8 +35,11 @@ local function log(level, msg, verbose)
|
|||||||
local name = i.name or "(nil)"
|
local name = i.name or "(nil)"
|
||||||
local vVal = 'nil'
|
local vVal = 'nil'
|
||||||
local m = (type(msg) == 'string') and msg or utils.dump(msg)
|
local m = (type(msg) == 'string') and msg or utils.dump(msg)
|
||||||
|
|
||||||
if v then logStream:write(now .. " (" .. M.LEVEL[level] .. ") " .. m .. " [" .. name .. "@" .. i.short_src .. ":" .. i.linedefined .. "]\n")
|
if v then logStream:write(now .. " (" .. M.LEVEL[level] .. ") " .. m .. " [" .. name .. "@" .. i.short_src .. ":" .. i.linedefined .. "]\n")
|
||||||
else logStream:write(now .. " (" .. M.LEVEL[level] .. ") " .. m .. "\n") end
|
else logStream:write(now .. " (" .. M.LEVEL[level] .. ") " .. m .. "\n") end
|
||||||
|
|
||||||
|
logStream:flush()
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user