Changes to 'sneeker.log' method:

Only log message if minetest setting 'log_mods' is 'true'.
This commit is contained in:
AntumDeluge
2017-05-29 01:23:15 -07:00
committed by Jordan Irwin
parent ea3ab21024
commit c905656ec8
3 changed files with 13 additions and 14 deletions

View File

@@ -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'