comparison plugins/mod_stanza_debug.lua @ 11120:b2331f3dfeea

Merge 0.11->trunk
author Matthew Wild <mwild1@gmail.com>
date Wed, 30 Sep 2020 09:50:33 +0100
parents 0f335815244f
children 74b9e05af71e
comparison
equal deleted inserted replaced
11119:68df52bf08d5 11120:b2331f3dfeea
1 module:set_global(); 1 module:set_global();
2 2
3 local tostring = tostring;
4 local filters = require "util.filters"; 3 local filters = require "util.filters";
5 4
6 local function log_send(t, session) 5 local function log_send(t, session)
7 if t and t ~= "" and t ~= " " then 6 if t and t ~= "" and t ~= " " then
8 session.log("debug", "SEND: %s", tostring(t)); 7 session.log("debug", "SEND: %s", t);
9 end 8 end
10 return t; 9 return t;
11 end 10 end
12 11
13 local function log_recv(t, session) 12 local function log_recv(t, session)
14 if t and t ~= "" and t ~= " " then 13 if t and t ~= "" and t ~= " " then
15 session.log("debug", "RECV: %s", tostring(t)); 14 session.log("debug", "RECV: %s", t);
16 end 15 end
17 return t; 16 return t;
18 end 17 end
19 18
20 local function init_raw_logging(session) 19 local function init_raw_logging(session)