Software /
code /
prosody
Comparison
core/s2smanager.lua @ 3265:9374f84c6677
s2smanager: Fix logging for outgoing sessions to also log pre-filtered data
author | Matthew Wild <mwild1@gmail.com> |
---|---|
date | Sun, 13 Jun 2010 17:17:11 +0100 |
parent | 3224:9dd54a708523 |
child | 3308:f5243ca9662f |
comparison
equal
deleted
inserted
replaced
3264:e1c787c6f86e | 3265:9374f84c6677 |
---|---|
347 cl.register_outgoing(conn, host_session); | 347 cl.register_outgoing(conn, host_session); |
348 | 348 |
349 local filter = initialize_filters(host_session); | 349 local filter = initialize_filters(host_session); |
350 local w, log = conn.write, host_session.log; | 350 local w, log = conn.write, host_session.log; |
351 host_session.sends2s = function (t) | 351 host_session.sends2s = function (t) |
352 log("debug", "sending: %s", (t.top_tag and t:top_tag()) or t:match("^[^>]*>?")); | |
352 if t.name then | 353 if t.name then |
353 t = filter("stanzas/out", t); | 354 t = filter("stanzas/out", t); |
354 end | 355 end |
355 if t then | 356 if t then |
356 t = filter("bytes/out", tostring(t)); | 357 t = filter("bytes/out", tostring(t)); |
357 if t then | 358 if t then |
358 log("debug", "sending: %s", (t.top_tag and t:top_tag()) or t:match("^[^>]*>?")); | |
359 return w(conn, tostring(t)); | 359 return w(conn, tostring(t)); |
360 end | 360 end |
361 end | 361 end |
362 end | 362 end |
363 | 363 |