Changeset

3524:d206b4e0a9f3

mod_saslauth: Improved logging a bit.
author Waqas Hussain <waqas20@gmail.com>
date Sat, 16 Oct 2010 05:16:45 +0500
parents 3523:32a0c3816d73
children 3525:1e44e7e8e79c
files plugins/mod_saslauth.lua
diffstat 1 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/plugins/mod_saslauth.lua	Sat Oct 16 05:03:00 2010 +0500
+++ b/plugins/mod_saslauth.lua	Sat Oct 16 05:16:45 2010 +0500
@@ -142,7 +142,6 @@
 end);
 
 module:hook("iq/self/urn:ietf:params:xml:ns:xmpp-bind:bind", function(event)
-	log("debug", "Client requesting a resource bind");
 	local origin, stanza = event.origin, event.stanza;
 	local resource;
 	if stanza.attr.type == "set" then
@@ -155,14 +154,15 @@
 		origin.send(st.reply(stanza)
 			:tag("bind", { xmlns = xmlns_bind })
 			:tag("jid"):text(origin.full_jid));
+		origin.log("debug", "Resource bound: %s", origin.full_jid);
 	else
 		origin.send(st.error_reply(stanza, err_type, err, err_msg));
+		origin.log("debug", "Resource bind failed: %s", err_msg or err);
 	end
 	return true;
 end);
 
 module:hook("iq/self/urn:ietf:params:xml:ns:xmpp-session:session", function(event)
-	log("debug", "Client requesting a session");
 	event.origin.send(st.reply(event.stanza));
 	return true;
 end);