comparison plugins/mod_stanza_debug.lua @ 10411:db2a06b9ff98

Merge 0.11->trunk
author Kim Alvefur <zash@zash.se>
date Sat, 16 Nov 2019 16:52:31 +0100
parents 0f335815244f
children 74b9e05af71e
comparison
equal deleted inserted replaced
10410:659b577f280c 10411:db2a06b9ff98
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)