Add custom logging method
parent
22465f7913
commit
4011882749
15
init.lua
15
init.lua
|
@ -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",
|
||||
|
|
Loading…
Reference in New Issue