-
Notifications
You must be signed in to change notification settings - Fork 4
Logging
Seppi edited this page Apr 26, 2016
·
1 revision
To change the way logging works, monkey patch log.
For example, to print the log to a file instead of standard out:
lovernetlib = require "lovernet"
log = function(...)
local args = {...} -- pull in all args
local _self = table.remove(args,1) -- remove self object
love.filesystem.append("log.txt",table.concat(args,"\t").."\n")
end
lovernet = lovernetlib.new{log=log}