summaryrefslogtreecommitdiff
path: root/builtin/game/deprecated.lua
diff options
context:
space:
mode:
authorShadowNinja <shadowninja@minetest.net>2015-10-13 03:57:44 -0400
committerkwolekr <kwolekr@minetest.net>2015-10-14 01:03:54 -0400
commit2139d7d45fb1a8ed250ad96c9975c581f02f72a9 (patch)
tree3e954063710add83723798937637db7c67a254eb /builtin/game/deprecated.lua
parente0b57c1140554fccbf3e57a036cc4100887ab8f1 (diff)
downloadminetest-2139d7d45fb1a8ed250ad96c9975c581f02f72a9.tar.gz
minetest-2139d7d45fb1a8ed250ad96c9975c581f02f72a9.tar.bz2
minetest-2139d7d45fb1a8ed250ad96c9975c581f02f72a9.zip
Refactor logging
- Add warning log level - Change debug_log_level setting to enumeration string - Map Irrlicht log events to MT log events - Encapsulate log_* functions and global variables into a class, Logger - Unify dstream with standard logging mechanism - Unify core.debug() with standard core.log() script API
Diffstat (limited to 'builtin/game/deprecated.lua')
-rw-r--r--builtin/game/deprecated.lua13
1 files changed, 6 insertions, 7 deletions
diff --git a/builtin/game/deprecated.lua b/builtin/game/deprecated.lua
index 405e599da..cd1cf5e2d 100644
--- a/builtin/game/deprecated.lua
+++ b/builtin/game/deprecated.lua
@@ -4,8 +4,7 @@
-- Default material types
--
local function digprop_err()
- core.log("info", debug.traceback())
- core.log("info", "WARNING: The core.digprop_* functions are obsolete and need to be replaced by item groups.")
+ core.log("deprecated", "The core.digprop_* functions are obsolete and need to be replaced by item groups.")
end
core.digprop_constanttime = digprop_err
@@ -16,12 +15,12 @@ core.digprop_woodlike = digprop_err
core.digprop_leaveslike = digprop_err
core.digprop_glasslike = digprop_err
-core.node_metadata_inventory_move_allow_all = function()
- core.log("info", "WARNING: core.node_metadata_inventory_move_allow_all is obsolete and does nothing.")
+function core.node_metadata_inventory_move_allow_all()
+ core.log("deprecated", "core.node_metadata_inventory_move_allow_all is obsolete and does nothing.")
end
-core.add_to_creative_inventory = function(itemstring)
- core.log('info', "WARNING: core.add_to_creative_inventory: This function is deprecated and does nothing.")
+function core.add_to_creative_inventory(itemstring)
+ core.log("deprecated", "core.add_to_creative_inventory: This function is deprecated and does nothing.")
end
--
@@ -32,7 +31,7 @@ local envref_deprecation_message_printed = false
setmetatable(core.env, {
__index = function(table, key)
if not envref_deprecation_message_printed then
- core.log("info", "WARNING: core.env:[...] is deprecated and should be replaced with core.[...]")
+ core.log("deprecated", "core.env:[...] is deprecated and should be replaced with core.[...]")
envref_deprecation_message_printed = true
end
local func = core[key]