Some more logging fixes
authorMatthew Wild <mwild1@gmail.com>
Fri, 14 Nov 2008 02:41:37 +0000 (02:41 +0000)
committerMatthew Wild <mwild1@gmail.com>
Fri, 14 Nov 2008 02:41:37 +0000 (02:41 +0000)
core/s2smanager.lua
plugins/mod_dialback.lua
util/logger.lua

index 4fa22957087c750f4b72da9ddd00c7276afa8da9..6d00ff6ea84be8362c0c33ec0927cdfd369c9671 100644 (file)
@@ -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
 
index dd9704f28fa3426da8d43d7bdb8f28b17ebdaace..d0c1dd6f34cce9cdd00e7d5fbc45e5f329468a07 100644 (file)
@@ -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);
 
index 8d98360536fdab26c73d4b27e1e42a76e0cf44a5..fd5d3d805b7120533e87f282ffe4ba6020d7fd08 100644 (file)
@@ -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