Software /
code /
prosody
Comparison
core/sessionmanager.lua @ 9066:af97ecd00734
sessionmanager: Log top tag of outgoing stanzas on c2s (#776)
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Sun, 22 Jul 2018 19:41:29 +0200 |
parent | 8184:dbcae15b4282 |
child | 9069:22e5f11c778a |
comparison
equal
deleted
inserted
replaced
8998:6bddc90eeb27 | 9066:af97ecd00734 |
---|---|
30 local function new_session(conn) | 30 local function new_session(conn) |
31 local session = { conn = conn, type = "c2s_unauthed", conntime = gettime() }; | 31 local session = { conn = conn, type = "c2s_unauthed", conntime = gettime() }; |
32 local filter = initialize_filters(session); | 32 local filter = initialize_filters(session); |
33 local w = conn.write; | 33 local w = conn.write; |
34 session.send = function (t) | 34 session.send = function (t) |
35 session.log("debug", "sending: %s", t.top_tag and t:top_tag() or t:match("^[^>]*>?")); | |
35 if t.name then | 36 if t.name then |
36 t = filter("stanzas/out", t); | 37 t = filter("stanzas/out", t); |
37 end | 38 end |
38 if t then | 39 if t then |
39 t = filter("bytes/out", tostring(t)); | 40 t = filter("bytes/out", tostring(t)); |