diff options
author | Kim Alvefur <zash@zash.se> | 2018-11-12 17:15:41 +0100 |
---|---|---|
committer | Kim Alvefur <zash@zash.se> | 2018-11-12 17:15:41 +0100 |
commit | e3164afc4a19b3f0d664b7c81bed3bb0e51781cd (patch) | |
tree | 5072ed1435f23a7451c3dc79453e195e549e4cfe /plugins/mod_scansion_record.lua | |
parent | b85188f938aa222bb49c85fbb90319fe0ab4ee23 (diff) | |
download | prosody-e3164afc4a19b3f0d664b7c81bed3bb0e51781cd.tar.gz prosody-e3164afc4a19b3f0d664b7c81bed3bb0e51781cd.zip |
mod_scansion_record: Split stanzas into multiple lines
Not perfect but should improve readability somewhat
Diffstat (limited to 'plugins/mod_scansion_record.lua')
-rw-r--r-- | plugins/mod_scansion_record.lua | 4 |
1 files changed, 3 insertions, 1 deletions
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) |