瀏覽代碼

Only log chunks in DEBUG mode

Danilo Bargen 7 年之前
父節點
當前提交
bb0a4cfcb4
共有 1 個文件被更改,包括 3 次插入1 次删除
  1. 3 1
      src/services/webclient.ts

+ 3 - 1
src/services/webclient.ts

@@ -619,7 +619,9 @@ export class WebClientService {
             // Handle messages directly
             this.relayedDataTask.on('data', (ev: saltyrtc.SaltyRTCEvent) => {
                 const chunk = new Uint8Array(ev.data);
-                this.$log.debug('[Chunk] Received chunk:', chunk);
+                if (this.config.MSG_DEBUGGING && this.config.DEBUG) {
+                    this.$log.debug('[Chunk] Received chunk:', chunk);
+                }
                 this.unchunker.add(chunk.buffer);
             });