Changeset

1879:42157c066813

xmppserver_listener: Add logger to s2s sessions
author Matthew Wild <mwild1@gmail.com>
date Sun, 04 Oct 2009 14:24:55 +0100
parents 1878:a8d57d5faec5
children 1880:d5dc9e06d917
files net/xmppserver_listener.lua
diffstat 1 files changed, 6 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/net/xmppserver_listener.lua	Sun Oct 04 14:17:54 2009 +0100
+++ b/net/xmppserver_listener.lua	Sun Oct 04 14:24:55 2009 +0100
@@ -114,6 +114,12 @@
 		session = s2s_new_incoming(conn);
 		sessions[conn] = session;
 
+		-- Logging functions --
+
+		
+		local conn_name = "s2sin"..tostring(conn):match("[a-f0-9]+$");
+		session.log = logger.init(conn_name);
+		
 		session.log("info", "Incoming s2s connection");
 		
 		session.reset_stream = session_reset_stream;