aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthew Wild <mwild1@gmail.com>2008-11-14 02:41:37 +0000
committerMatthew Wild <mwild1@gmail.com>2008-11-14 02:41:37 +0000
commit428fc65bbc595d80cb678dadcc9ea7cae055d5b9 (patch)
tree5ab99b9b588fba94f6cdd797ac7a6311162ca8aa
parent6d9485225a4c8c9b339ca9cea137ba3f2de6fd64 (diff)
downloadprosody-428fc65bbc595d80cb678dadcc9ea7cae055d5b9.tar.gz
prosody-428fc65bbc595d80cb678dadcc9ea7cae055d5b9.zip
Some more logging fixes
-rw-r--r--core/s2smanager.lua7
-rw-r--r--plugins/mod_dialback.lua1
-rw-r--r--util/logger.lua4
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("</stream:features>");]]
- 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("<db:verify from='%s' to='%s' id='%s' type='%s'>%s</db:verify>", 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