Comparison

core/sessionmanager.lua @ 9065:f3adcc3fce8c

sessionmanager, mod_s2s: Bring debug line for outgoing stanzas in line with that for incoming
author Kim Alvefur <zash@zash.se>
date Tue, 24 Jul 2018 19:07:26 +0200
parent 9062:1b272b51ae0f
child 9070:21730a3642fe
comparison
equal deleted inserted replaced
9064:93ac83372ac2 9065:f3adcc3fce8c
31 local function new_session(conn) 31 local function new_session(conn)
32 local session = { conn = conn, type = "c2s_unauthed", conntime = gettime() }; 32 local session = { conn = conn, type = "c2s_unauthed", conntime = gettime() };
33 local filter = initialize_filters(session); 33 local filter = initialize_filters(session);
34 local w = conn.write; 34 local w = conn.write;
35 session.send = function (t) 35 session.send = function (t)
36 session.log("debug", "sending: %s", t.top_tag and t:top_tag() or t:match("^[^>]*>?")); 36 session.log("debug", "Sending[%s]: %s", session.type, t.top_tag and t:top_tag() or t:match("^[^>]*>?"));
37 if t.name then 37 if t.name then
38 t = filter("stanzas/out", t); 38 t = filter("stanzas/out", t);
39 end 39 end
40 if t then 40 if t then
41 t = filter("bytes/out", tostring(t)); 41 t = filter("bytes/out", tostring(t));