diff options
author | Marvin W <git@larma.de> | 2019-07-14 13:33:36 +0200 |
---|---|---|
committer | Marvin W <git@larma.de> | 2019-07-14 13:33:36 +0200 |
commit | 567ac81d7828357b2fecc10dc15d902a717a9556 (patch) | |
tree | b6c6baf1bcda5b38ef935f59ac984881af0f9345 /xmpp-vala/src | |
parent | e4e97730dbd1eed6d0c558d0fef56822c09a52b1 (diff) | |
download | dino-567ac81d7828357b2fecc10dc15d902a717a9556.tar.gz dino-567ac81d7828357b2fecc10dc15d902a717a9556.zip |
Do not log long bodies
Diffstat (limited to 'xmpp-vala/src')
-rw-r--r-- | xmpp-vala/src/core/stanza_node.vala | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/xmpp-vala/src/core/stanza_node.vala b/xmpp-vala/src/core/stanza_node.vala index 0544cc1f..6ef3f0aa 100644 --- a/xmpp-vala/src/core/stanza_node.vala +++ b/xmpp-vala/src/core/stanza_node.vala @@ -333,6 +333,9 @@ public class StanzaNode : StanzaEntry { internal string printf(int i, string fmt_start_begin, string start_empty_end, string start_content_end, string fmt_end, string fmt_attr, bool no_ns = false) { string indent = string.nfill (i * 2, ' '); if (name == "#text") { + if (((!)val).length > 1000) { + return indent + "[... retracted for brevity ...]\n"; + } return indent + ((!)val).replace("\n", indent + "\n") + "\n"; } var sb = new StringBuilder(); |