aboutsummaryrefslogtreecommitdiff
path: root/builtin
diff options
context:
space:
mode:
authorPilzAdam <pilzadam@minetest.net>2013-11-17 12:11:44 +0100
committerPilzAdam <pilzadam@minetest.net>2013-11-17 12:11:44 +0100
commit367b5382a394e853128092afd23fc7e360d369d1 (patch)
tree6455633ecb9ada24b485e1dd4130caf2ca454dd8 /builtin
parenta92fc3563ccc34f1fb93170f5943c719d843fb35 (diff)
downloadminetest-367b5382a394e853128092afd23fc7e360d369d1.tar.gz
minetest-367b5382a394e853128092afd23fc7e360d369d1.tar.bz2
minetest-367b5382a394e853128092afd23fc7e360d369d1.zip
Replace print()s with minetest.log() in builtin
Diffstat (limited to 'builtin')
-rw-r--r--builtin/chatcommands.lua6
-rw-r--r--builtin/modmgr.lua4
-rw-r--r--builtin/serialize.lua2
3 files changed, 6 insertions, 6 deletions
diff --git a/builtin/chatcommands.lua b/builtin/chatcommands.lua
index 7d1c2b62a..831d3a7b4 100644
--- a/builtin/chatcommands.lua
+++ b/builtin/chatcommands.lua
@@ -471,10 +471,10 @@ minetest.register_chatcommand("spawnentity", {
minetest.chat_send_player(name, "entityname required")
return
end
- print('/spawnentity invoked, entityname="'..entityname..'"')
+ minetest.log("action", '/spawnentity invoked, entityname="'..entityname..'"')
local player = minetest.get_player_by_name(name)
if player == nil then
- print("Unable to spawn entity, player is nil")
+ minetest.log("error", "Unable to spawn entity, player is nil")
return true -- Handled chat message
end
local p = player:getpos()
@@ -491,7 +491,7 @@ minetest.register_chatcommand("pulverize", {
func = function(name, param)
local player = minetest.get_player_by_name(name)
if player == nil then
- print("Unable to pulverize, player is nil")
+ minetest.log("error", "Unable to pulverize, player is nil")
return true -- Handled chat message
end
if player:get_wielded_item():is_empty() then
diff --git a/builtin/modmgr.lua b/builtin/modmgr.lua
index 04f19ec86..490336f06 100644
--- a/builtin/modmgr.lua
+++ b/builtin/modmgr.lua
@@ -778,7 +778,7 @@ function modmgr.handle_configure_world_buttons(fields)
end
if not worldfile:write() then
- print("failed to write world config file")
+ minetest.log("error", "Failed to write world config file")
end
modmgr.modlist = nil
@@ -932,7 +932,7 @@ function modmgr.preparemodlist(data)
if element ~= nil then
element.enabled = engine.is_yes(value)
else
- print("Mod: " .. key .. " " .. dump(value) .. " but not found")
+ minetest.log("info", "Mod: " .. key .. " " .. dump(value) .. " but not found")
end
end
end
diff --git a/builtin/serialize.lua b/builtin/serialize.lua
index 61b923ce4..165cc6731 100644
--- a/builtin/serialize.lua
+++ b/builtin/serialize.lua
@@ -178,7 +178,7 @@ function minetest.deserialize(sdata)
if okay then
return results
end
- print('error:'.. results)
+ minetest.log('error', 'minetest.deserialize(): '.. results)
return nil
end