Add custom logging method

master
Jordan Irwin 2021-05-23 22:34:15 -07:00
parent 22465f7913
commit 4011882749
1 changed files with 15 additions and 0 deletions

View File

@ -30,6 +30,21 @@ end
cmer.modname = core.get_current_modname()
cmer.modpath = core.get_modpath(cmer.modname)
function cmer.log(lvl, msg)
if not msg then
msg = lvl
lvl = nil
end
msg = "[" .. cmer.modname .. "] " msg
if not lvl then
core.log(msg)
else
core.log(lvl, msg)
end
end
local scripts = {
"common",
"functions",