comparison plugins/mod_stanza_debug.lua @ 11200:bf8f2da84007

Merge 0.11->trunk
author Kim Alvefur <zash@zash.se>
date Thu, 05 Nov 2020 22:31:25 +0100
parents 0f335815244f
children 74b9e05af71e
comparison
equal deleted inserted replaced
11199:6c7c50a4de32 11200:bf8f2da84007
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)