diff options
author | Marvin W <git@larma.de> | 2019-12-22 19:28:40 +0100 |
---|---|---|
committer | Marvin W <git@larma.de> | 2019-12-22 19:30:16 +0100 |
commit | 1bb75f40d26ad20381a200e09eaa9f519cffe398 (patch) | |
tree | 08f8d993505701ee879e9aa1c6d08106928ec9cb /xmpp-vala/src/core/xmpp_log.vala | |
parent | 9ef4dddfdc40f515be6c780bf9fa089111590a74 (diff) | |
download | dino-1bb75f40d26ad20381a200e09eaa9f519cffe398.tar.gz dino-1bb75f40d26ad20381a200e09eaa9f519cffe398.zip |
Add timing to logs, fix issue of silently ignored I/O errors
Diffstat (limited to 'xmpp-vala/src/core/xmpp_log.vala')
-rw-r--r-- | xmpp-vala/src/core/xmpp_log.vala | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/xmpp-vala/src/core/xmpp_log.vala b/xmpp-vala/src/core/xmpp_log.vala index 921899c4..4790a8ab 100644 --- a/xmpp-vala/src/core/xmpp_log.vala +++ b/xmpp-vala/src/core/xmpp_log.vala @@ -108,15 +108,15 @@ public class XmppLog { return false; } - public void node(string what, StanzaNode node) { + public void node(string what, StanzaNode node, XmppStream stream) { if (should_log_node(node)) { - stderr.printf("%sXMPP %s [%s]%s\n%s\n", use_ansi ? ANSI_COLOR_WHITE : "", what, ident, use_ansi ? ANSI_COLOR_END : "", use_ansi ? node.to_ansi_string(hide_ns) : node.to_string()); + stderr.printf("%sXMPP %s [%s %p %s]%s\n%s\n", use_ansi ? ANSI_COLOR_WHITE : "", what, ident, stream, new DateTime.now_local().to_string(), use_ansi ? ANSI_COLOR_END : "", use_ansi ? node.to_ansi_string(hide_ns) : node.to_string()); } } - public void str(string what, string str) { + public void str(string what, string str, XmppStream stream) { if (should_log_str(str)) { - stderr.printf("%sXMPP %s [%s]%s\n%s\n", use_ansi ? ANSI_COLOR_WHITE : "", what, ident, use_ansi ? ANSI_COLOR_END : "", str); + stderr.printf("%sXMPP %s [%s %p %s]%s\n%s\n", use_ansi ? ANSI_COLOR_WHITE : "", what, ident, stream, new DateTime.now_local().to_string(), use_ansi ? ANSI_COLOR_END : "", str); } } |