Skip to content

Commit 367b538

Browse files
committedNov 17, 2013
Replace print()s with minetest.log() in builtin
1 parent a92fc35 commit 367b538

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed
 

‎builtin/chatcommands.lua

+3-3
Original file line numberDiff line numberDiff line change
@@ -471,10 +471,10 @@ minetest.register_chatcommand("spawnentity", {
471471
minetest.chat_send_player(name, "entityname required")
472472
return
473473
end
474-
print('/spawnentity invoked, entityname="'..entityname..'"')
474+
minetest.log("action", '/spawnentity invoked, entityname="'..entityname..'"')
475475
local player = minetest.get_player_by_name(name)
476476
if player == nil then
477-
print("Unable to spawn entity, player is nil")
477+
minetest.log("error", "Unable to spawn entity, player is nil")
478478
return true -- Handled chat message
479479
end
480480
local p = player:getpos()
@@ -491,7 +491,7 @@ minetest.register_chatcommand("pulverize", {
491491
func = function(name, param)
492492
local player = minetest.get_player_by_name(name)
493493
if player == nil then
494-
print("Unable to pulverize, player is nil")
494+
minetest.log("error", "Unable to pulverize, player is nil")
495495
return true -- Handled chat message
496496
end
497497
if player:get_wielded_item():is_empty() then

‎builtin/modmgr.lua

+2-2
Original file line numberDiff line numberDiff line change
@@ -778,7 +778,7 @@ function modmgr.handle_configure_world_buttons(fields)
778778
end
779779

780780
if not worldfile:write() then
781-
print("failed to write world config file")
781+
minetest.log("error", "Failed to write world config file")
782782
end
783783

784784
modmgr.modlist = nil
@@ -932,7 +932,7 @@ function modmgr.preparemodlist(data)
932932
if element ~= nil then
933933
element.enabled = engine.is_yes(value)
934934
else
935-
print("Mod: " .. key .. " " .. dump(value) .. " but not found")
935+
minetest.log("info", "Mod: " .. key .. " " .. dump(value) .. " but not found")
936936
end
937937
end
938938
end

‎builtin/serialize.lua

+1-1
Original file line numberDiff line numberDiff line change
@@ -178,7 +178,7 @@ function minetest.deserialize(sdata)
178178
if okay then
179179
return results
180180
end
181-
print('error:'.. results)
181+
minetest.log('error', 'minetest.deserialize(): '.. results)
182182
return nil
183183
end
184184

0 commit comments

Comments
 (0)
Please sign in to comment.