Skip to content

Commit

Permalink
Replace print()s with minetest.log() in builtin
Browse files Browse the repository at this point in the history
  • Loading branch information
PilzAdam committed Nov 17, 2013
1 parent a92fc35 commit 367b538
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions builtin/chatcommands.lua
Expand Up @@ -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()
Expand All @@ -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
Expand Down
4 changes: 2 additions & 2 deletions builtin/modmgr.lua
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion builtin/serialize.lua
Expand Up @@ -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

Expand Down

0 comments on commit 367b538

Please sign in to comment.