Do not log long bodies

This commit is contained in:
Marvin W 2019-07-14 13:33:36 +02:00
parent e4e97730db
commit 567ac81d78
No known key found for this signature in database
GPG key ID: 072E9235DB996F2A

View file

@ -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) { 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, ' '); string indent = string.nfill (i * 2, ' ');
if (name == "#text") { if (name == "#text") {
if (((!)val).length > 1000) {
return indent + "[... retracted for brevity ...]\n";
}
return indent + ((!)val).replace("\n", indent + "\n") + "\n"; return indent + ((!)val).replace("\n", indent + "\n") + "\n";
} }
var sb = new StringBuilder(); var sb = new StringBuilder();