Logging improvements
This commit is contained in:
parent
ff0fea8978
commit
e5c639c779
|
@ -24,12 +24,12 @@ end
|
||||||
|
|
||||||
local LOGGING_ON = minetest.settings:get_bool("mcl_logging_default",false)
|
local LOGGING_ON = minetest.settings:get_bool("mcl_logging_default",false)
|
||||||
local LOG_MODULE = "[MCL2]"
|
local LOG_MODULE = "[MCL2]"
|
||||||
function mcl_util.mcl_log (message, module)
|
function mcl_util.mcl_log (message, module, bypass_default_logger)
|
||||||
local selected_module = LOG_MODULE
|
local selected_module = LOG_MODULE
|
||||||
if module then
|
if module then
|
||||||
selected_module = module
|
selected_module = module
|
||||||
end
|
end
|
||||||
if LOGGING_ON and message then
|
if (bypass_default_logger or LOGGING_ON) and message then
|
||||||
minetest.log(selected_module .. " " .. message)
|
minetest.log(selected_module .. " " .. message)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue