Przeglądaj źródła

Only log chunks in DEBUG mode

Danilo Bargen 7 lat temu
rodzic
commit
bb0a4cfcb4
1 zmienionych plików z 3 dodań i 1 usunięć
  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);
             });