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() { ...@@ -63562,15 +63562,17 @@ function setUpXMLLogging() {
_converse.log(msg, level); _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.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'); _converse.log(body.outerHTML, strophe_js__WEBPACK_IMPORTED_MODULE_0__["Strophe"].LogLevel.DEBUG, 'color: darkcyan');
};
} }
};
} }
function finishInitialization() { function finishInitialization() {
...@@ -441,14 +441,16 @@ function setUpXMLLogging () { ...@@ -441,14 +441,16 @@ function setUpXMLLogging () {
Strophe.log = function (level, msg) { Strophe.log = function (level, msg) {
_converse.log(msg, level); _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.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'); _converse.log(body.outerHTML, Strophe.LogLevel.DEBUG, 'color: darkcyan');
};
} }
};
} }
......
...@@ -42074,15 +42074,17 @@ function setUpXMLLogging() { ...@@ -42074,15 +42074,17 @@ function setUpXMLLogging() {
_converse.log(msg, level); _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.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'); _converse.log(body.outerHTML, strophe_js__WEBPACK_IMPORTED_MODULE_0__["Strophe"].LogLevel.DEBUG, 'color: darkcyan');
};
} }
};
} }
function finishInitialization() { 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