20 lines
364 B
Lua
20 lines
364 B
Lua
local M = {}
|
|
|
|
function M.log(fmt, ...)
|
|
print(string.format("[%12f] ", os.clock()) .. string.format(fmt, ...))
|
|
end
|
|
|
|
function M.info(fmt, ...)
|
|
print("INFO: " .. string.format(fmt, ...))
|
|
end
|
|
|
|
function M.warn(fmt, ...)
|
|
print("WARN: " .. string.format(fmt, ...))
|
|
end
|
|
|
|
function M.error(fmt, ...)
|
|
print("ERROR: " .. string.format(fmt, ...))
|
|
end
|
|
|
|
return M
|