Commit 3c988240 authored by JC Brand's avatar JC Brand

Don't check for debug mode too early

Otherwise we can't enable it during operation
parent 4eb6df92
......@@ -63562,15 +63562,17 @@ function setUpXMLLogging() {
_converse.log(msg, level);
};
if (_converse.debug) {
_converse.connection.xmlInput = function (body) {
_converse.connection.xmlInput = function (body) {
if (_converse.debug) {
_converse.log(body.outerHTML, strophe_js__WEBPACK_IMPORTED_MODULE_0__["Strophe"].LogLevel.DEBUG, 'color: darkgoldenrod');
};
}
};
_converse.connection.xmlOutput = function (body) {
_converse.connection.xmlOutput = function (body) {
if (_converse.debug) {
_converse.log(body.outerHTML, strophe_js__WEBPACK_IMPORTED_MODULE_0__["Strophe"].LogLevel.DEBUG, 'color: darkcyan');
};
}
}
};
}
function finishInitialization() {
......@@ -150,7 +150,7 @@ _converse.CONNECTION_STATUS = {
7: 'DISCONNECTING',
8: 'ATTACHED',
9: 'REDIRECT',
10: 'RECONNECTING',
10: 'RECONNECTING',
};
_converse.SUCCESS = 'success';
......@@ -441,14 +441,16 @@ function setUpXMLLogging () {
Strophe.log = function (level, msg) {
_converse.log(msg, level);
};
if (_converse.debug) {
_converse.connection.xmlInput = function (body) {
_converse.connection.xmlInput = function (body) {
if (_converse.debug) {
_converse.log(body.outerHTML, Strophe.LogLevel.DEBUG, 'color: darkgoldenrod');
};
_converse.connection.xmlOutput = function (body) {
}
};
_converse.connection.xmlOutput = function (body) {
if (_converse.debug) {
_converse.log(body.outerHTML, Strophe.LogLevel.DEBUG, 'color: darkcyan');
};
}
}
};
}
......
......@@ -42074,15 +42074,17 @@ function setUpXMLLogging() {
_converse.log(msg, level);
};
if (_converse.debug) {
_converse.connection.xmlInput = function (body) {
_converse.connection.xmlInput = function (body) {
if (_converse.debug) {
_converse.log(body.outerHTML, strophe_js__WEBPACK_IMPORTED_MODULE_0__["Strophe"].LogLevel.DEBUG, 'color: darkgoldenrod');
};
}
};
_converse.connection.xmlOutput = function (body) {
_converse.connection.xmlOutput = function (body) {
if (_converse.debug) {
_converse.log(body.outerHTML, strophe_js__WEBPACK_IMPORTED_MODULE_0__["Strophe"].LogLevel.DEBUG, 'color: darkcyan');
};
}
}
};
}
function finishInitialization() {
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment