Done log file, log print automaticaly log writes
This commit is contained in:
parent
609a3d79cd
commit
19c5487789
|
@ -90,8 +90,9 @@ end]]
|
||||||
|
|
||||||
function logPrint(string)
|
function logPrint(string)
|
||||||
if logging then print(string) end
|
if logging then print(string) end
|
||||||
|
logWrite(string)
|
||||||
end
|
end
|
||||||
|
|
||||||
function logWrite(string)
|
function logWrite(string)
|
||||||
if logging then print(string) end
|
if logging then love.filesystem.append(logFile, string) end
|
||||||
end
|
end
|
||||||
|
|
|
@ -45,3 +45,6 @@ return {
|
||||||
objects = {}
|
objects = {}
|
||||||
}
|
}
|
||||||
]]
|
]]
|
||||||
|
logFile = "mothback_"..os.date("%Y-%m-%d_%H-%M-%S")..".log"
|
||||||
|
local success, message = love.filesystem.write(logFile, "")
|
||||||
|
if message ~= nil then print(message) end
|
||||||
|
|
Loading…
Reference in New Issue