From 520352753557fc566fe3c525b135d3c792a7e80c Mon Sep 17 00:00:00 2001 From: Joas Schilling Date: Tue, 2 Jun 2020 15:34:56 +0200 Subject: Reduce console logging unless in debug Signed-off-by: Joas Schilling --- src/utils/signaling.js | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'src/utils/signaling.js') diff --git a/src/utils/signaling.js b/src/utils/signaling.js index 133292930..24a3a4845 100644 --- a/src/utils/signaling.js +++ b/src/utils/signaling.js @@ -603,7 +603,9 @@ Signaling.Standalone.prototype.connect = function() { if (typeof (data) === 'string') { data = JSON.parse(data) } - console.debug('Received', data) + if (OC.debug) { + console.debug('Received', data) + } const id = data.id if (id && this.callbacks.hasOwnProperty(id)) { const cb = this.callbacks[id] @@ -771,7 +773,9 @@ Signaling.Standalone.prototype.doSend = function(msg, callback) { this.callbacks[id] = callback msg['id'] = '' + id } - console.debug('Sending', msg) + if (OC.debug) { + console.debug('Sending', msg) + } this.socket.send(JSON.stringify(msg)) } -- cgit v1.2.3