Changes to 'sneeker.log' method:
Only log message if minetest setting 'log_mods' is 'true'.
This commit is contained in:
committed by
Jordan Irwin
parent
ea3ab21024
commit
c905656ec8
@@ -1,9 +1,14 @@
|
||||
-- Functions for sneeker mod
|
||||
|
||||
|
||||
local log_mods = minetest.settings:get_bool("log_mods", false)
|
||||
|
||||
|
||||
-- Displays a message in log output
|
||||
function sneeker.log(message)
|
||||
minetest.log('action', '[' .. sneeker.modname .. '] ' .. message)
|
||||
if log_mods then
|
||||
minetest.log('action', '[' .. sneeker.modname .. '] ' .. message)
|
||||
end
|
||||
end
|
||||
|
||||
-- Displays a message in log output only if 'sneeker.debug' is set to 'true'
|
||||
|
||||
Reference in New Issue
Block a user