Diff

plugins/mod_presence.lua @ 4993:5243b74a4cbb

Hopefully inert commit to clean up logging across a number of modules, removing all cases of concatenation when building log messages
author Matthew Wild <mwild1@gmail.com>
date Mon, 23 Jul 2012 17:32:33 +0100
parent 4967:b7bcf088e723
child 5013:ab693eea0869
line wrap: on
line diff
--- a/plugins/mod_presence.lua	Mon Jul 23 16:42:26 2012 +0100
+++ b/plugins/mod_presence.lua	Mon Jul 23 17:32:33 2012 +0100
@@ -160,7 +160,7 @@
 			end
 		end
 	end
-	log("debug", "broadcasted presence of "..count.." resources from "..user.."@"..host.." to "..jid);
+	log("debug", "broadcasted presence of %d resources from %s@%s to %s", count, user, host, jid);
 	return count;
 end
 
@@ -169,7 +169,7 @@
 	if to_bare == from_bare then return; end -- No self contacts
 	local st_from, st_to = stanza.attr.from, stanza.attr.to;
 	stanza.attr.from, stanza.attr.to = from_bare, to_bare;
-	log("debug", "outbound presence "..stanza.attr.type.." from "..from_bare.." for "..to_bare);
+	log("debug", "outbound presence %s from %s for %s", stanza.attr.type, from_bare, to_bare);
 	if stanza.attr.type == "probe" then
 		stanza.attr.from, stanza.attr.to = st_from, st_to;
 		return;
@@ -214,7 +214,7 @@
 	local node, host = jid_split(to_bare);
 	local st_from, st_to = stanza.attr.from, stanza.attr.to;
 	stanza.attr.from, stanza.attr.to = from_bare, to_bare;
-	log("debug", "inbound presence "..stanza.attr.type.." from "..from_bare.." for "..to_bare);
+	log("debug", "inbound presence %s from %s for %s", stanza.attr.type, from_bare, to_bare);
 	
 	if stanza.attr.type == "probe" then
 		local result, err = rostermanager.is_contact_subscribed(node, host, from_bare);