From e2e508354835106abf4fd0530f854d3796a7e512 Mon Sep 17 00:00:00 2001 From: Kim Alvefur Date: Mon, 12 Nov 2018 17:15:41 +0100 Subject: mod_scansion_record: Split stanzas into multiple lines Not perfect but should improve readability somewhat --- plugins/mod_scansion_record.lua | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/plugins/mod_scansion_record.lua b/plugins/mod_scansion_record.lua index 0c0e8dbd..8d772b4e 100644 --- a/plugins/mod_scansion_record.lua +++ b/plugins/mod_scansion_record.lua @@ -37,7 +37,9 @@ local function record_event(session, event) end local function record_stanza(stanza, session, verb) - record(session.scansion_id.." "..verb..":\n\t"..tostring(stanza).."\n\n"); + local flattened = tostring(stanza):gsub("><", ">\n\t<"); + -- TODO Proper prettyprinting with indentation + record(session.scansion_id.." "..verb..":\n\t"..flattened.."\n\n"); end local function record_stanza_in(stanza, session) -- cgit v1.2.3