diff options
author | Joas Schilling <coding@schilljs.com> | 2020-06-02 15:34:56 +0200 |
---|---|---|
committer | Joas Schilling <coding@schilljs.com> | 2020-06-02 15:35:09 +0200 |
commit | 520352753557fc566fe3c525b135d3c792a7e80c (patch) | |
tree | bcda993a7d0342c9af1866763692231dac7598cf /src/utils | |
parent | b6561a15a37c22dfc369756702874390cd4f0833 (diff) |
Reduce console logging unless in debug
Signed-off-by: Joas Schilling <coding@schilljs.com>
Diffstat (limited to 'src/utils')
-rw-r--r-- | src/utils/signaling.js | 8 |
1 files changed, 6 insertions, 2 deletions
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)) } |