0
0
mirror of https://github.com/Doodle3D/doodle3d-firmware.git synced 2024-12-22 11:03:48 +01:00

Logger now flushes buffer to have log file update immediately.

This commit is contained in:
Wouter R 2013-08-23 10:43:42 +02:00
parent 1d9801b314
commit f7dc891c97

View File

@ -35,8 +35,11 @@ local function log(level, msg, verbose)
local name = i.name or "(nil)"
local vVal = 'nil'
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")
else logStream:write(now .. " (" .. M.LEVEL[level] .. ") " .. m .. "\n") end
logStream:flush()
end
end