portmanager: Show a friendly error message when initializing SSL fails (thanks MattJ...
[prosody.git] / core / s2smanager.lua
index 5fe3a3751d909ae0f357d45840b28ae202b4a980..76dde9d27d3b0b81f25ec5b9f13743d4bf2888e0 100644 (file)
@@ -74,7 +74,7 @@ function make_authenticated(session, host)
        else
                return false;
        end
-       session.log("debug", "connection %s->%s is now authenticated for %s", session.from_host or "(unknown)", session.to_host or "(unknown)", host);
+       session.log("debug", "connection %s->%s is now authenticated for %s", session.from_host, session.to_host, host);
        
        mark_connected(session);
        
@@ -87,7 +87,7 @@ function mark_connected(session)
        
        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 @@ function mark_connected(session)
        
        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;