Diff

core/s2smanager.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 4930:42ac50c0382e
child 4994:d4e6a07a7c33
line wrap: on
line diff
--- a/core/s2smanager.lua	Mon Jul 23 16:42:26 2012 +0100
+++ b/core/s2smanager.lua	Mon Jul 23 17:32:33 2012 +0100
@@ -87,7 +87,7 @@
 	
 	local from, to = session.from_host, session.to_host;
 	
-	session.log("info", session.direction.." s2s connection "..from.."->"..to.." complete");
+	session.log("info", "%s s2s connection %s->%s complete", session.direction, from, to);
 
 	local event_data = { session = session };
 	if session.type == "s2sout" then
@@ -105,7 +105,7 @@
 	
 	if session.direction == "outgoing" then
 		if sendq then
-			session.log("debug", "sending "..#sendq.." queued stanzas across new outgoing connection to "..session.to_host);
+			session.log("debug", "sending %d queued stanzas across new outgoing connection to %s", #sendq, session.to_host);
 			for i, data in ipairs(sendq) do
 				send(data[1]);
 				sendq[i] = nil;