| author | Stephen Paul Weber
<singpolyma@singpolyma.net> 2024-04-16 13:56:23 UTC |
| committer | Stephen Paul Weber
<singpolyma@singpolyma.net> 2024-04-16 13:56:23 UTC |
| parent | 936b2955342bf584be10f51c57b5993b9bdbf316 |
| snikket/streams/XmppStropheStream.hx | +4 | -1 |
diff --git a/snikket/streams/XmppStropheStream.hx b/snikket/streams/XmppStropheStream.hx index 8ea21fb..6b7741d 100644 --- a/snikket/streams/XmppStropheStream.hx +++ b/snikket/streams/XmppStropheStream.hx @@ -155,7 +155,10 @@ class XmppStropheStream extends GenericStream { override public function new() { super(); StropheCtx.initialize(); // TODO: shutdown? - untyped __cpp__("xmpp_log_t *logger = xmpp_get_default_logger(XMPP_LEVEL_DEBUG);"); + untyped __cpp__("xmpp_log_t *logger = NULL;"); + if (Sys.getEnv("SNIKKET_XMPP_DEBUG") != null) { + untyped __cpp__("logger = xmpp_get_default_logger(XMPP_LEVEL_DEBUG);"); + } ctx = StropheCtx.create(null, untyped __cpp__("logger")); conn = StropheConn.create(ctx); StropheConn.handler_add(