Changeset

259:1485d272400d

Some more logging fixes
author Matthew Wild <mwild1@gmail.com>
date Fri, 14 Nov 2008 02:41:37 +0000
parents 258:a93ccd84db83
children 260:182f0c895676
files core/s2smanager.lua plugins/mod_dialback.lua util/logger.lua
diffstat 3 files changed, 6 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- a/core/s2smanager.lua	Fri Nov 14 02:38:41 2008 +0000
+++ b/core/s2smanager.lua	Fri Nov 14 02:41:37 2008 +0000
@@ -103,11 +103,11 @@
 		
 		conn = wraptlsclient(cl, conn, to_host, 5269, 0, 1, hosts[from_host].ssl_ctx );
 		host_session.conn = conn;
-
+		
 		-- Register this outgoing connection so that xmppserver_listener knows about it
 		-- otherwise it will assume it is a new incoming connection
 		cl.register_outgoing(conn, host_session);
-
+		
 		do
 			local conn_name = "s2sout"..tostring(conn):match("[a-f0-9]*$");
 			host_session.log = logger_init(conn_name);
@@ -122,7 +122,6 @@
 end
 
 function streamopened(session, attr)
-	session.log("debug", "s2s stream opened");
 	local send = session.sends2s;
 	
 	session.version = tonumber(attr.version) or 0;
@@ -166,7 +165,7 @@
 	end
 
 	send("</stream:features>");]]
-	log("info", "s2s stream opened successfully");
+
 	session.notopen = nil;
 end
 
--- a/plugins/mod_dialback.lua	Fri Nov 14 02:38:41 2008 +0000
+++ b/plugins/mod_dialback.lua	Fri Nov 14 02:41:37 2008 +0000
@@ -22,6 +22,7 @@
 			type = "invalid"
 			log("warn", "Asked to verify a dialback key that was incorrect. An imposter is claiming to be %s?", attr.to);
 		end
+		log("debug", "verifyied dialback key... it is %s", type);
 		origin.sends2s(format("<db:verify from='%s' to='%s' id='%s' type='%s'>%s</db:verify>", attr.to, attr.from, attr.id, type, stanza[1]));
 	end);
 
--- a/util/logger.lua	Fri Nov 14 02:38:41 2008 +0000
+++ b/util/logger.lua	Fri Nov 14 02:41:37 2008 +0000
@@ -13,9 +13,9 @@
 					level = level .. ","..tostring(inf.short_src):match("[^/]*$")..":"..inf.currentline;
 				end
 				if ... then 
-					print(level, format(message, ...));
+					print(name, level, format(message, ...));
 				else
-					print(level, message);
+					print(name, level, message);
 				end
 			end
 end