From 428fc65bbc595d80cb678dadcc9ea7cae055d5b9 Mon Sep 17 00:00:00 2001 From: Matthew Wild Date: Fri, 14 Nov 2008 02:41:37 +0000 Subject: Some more logging fixes --- core/s2smanager.lua | 7 +++---- plugins/mod_dialback.lua | 1 + util/logger.lua | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/core/s2smanager.lua b/core/s2smanager.lua index 4fa22957..6d00ff6e 100644 --- a/core/s2smanager.lua +++ b/core/s2smanager.lua @@ -103,11 +103,11 @@ function new_outgoing(from_host, to_host) 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 @@ function new_outgoing(from_host, to_host) 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 @@ function streamopened(session, attr) end send("");]] - log("info", "s2s stream opened successfully"); + session.notopen = nil; end diff --git a/plugins/mod_dialback.lua b/plugins/mod_dialback.lua index dd9704f2..d0c1dd6f 100644 --- a/plugins/mod_dialback.lua +++ b/plugins/mod_dialback.lua @@ -22,6 +22,7 @@ add_handler({"s2sin_unauthed", "s2sin"}, "verify", xmlns_dialback, 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("%s", attr.to, attr.from, attr.id, type, stanza[1])); end); diff --git a/util/logger.lua b/util/logger.lua index 8d983605..fd5d3d80 100644 --- a/util/logger.lua +++ b/util/logger.lua @@ -13,9 +13,9 @@ function init(name) 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 -- cgit v1.2.3