Changed loggin to only log when enabled with logPrint function

This commit is contained in:
bizcochito
2022-02-07 09:36:16 +01:00
parent 75b7aad1e6
commit 89c12b4a0b
4 changed files with 10 additions and 6 deletions

View File

@@ -57,7 +57,7 @@ function love.load()
gravity = 0.2
-- Debug and log stuff
memoryUsage, dtcount = 0, 0
if logging then print("mothback: "..collectgarbage("count").." kB, Loading time: "..os.clock().." seconds") end
logPrint("mothback: "..collectgarbage("count").." kB, Loading time: "..os.clock().." seconds")
end
function love.update(dt)
@@ -81,7 +81,7 @@ function love.update(dt)
if debug or logging then
memoryUsage = math.floor(collectgarbage("count"))
end
if logging then print("Second "..secs..": "..memoryUsage.." kB") end
logPrint("Second "..secs..": "..memoryUsage.." kB")
end
--keypressed