Quellcode durchsuchen

Add MSGPACK_DEBUGGING config option

Danilo Bargen vor 7 Jahren
Ursprung
Commit
bc3a2899ae
3 geänderte Dateien mit 4 neuen und 2 gelöschten Zeilen
  1. 2 1
      src/config.ts
  2. 1 1
      src/services/webclient.ts
  3. 1 0
      src/threema.d.ts

+ 2 - 1
src/config.ts

@@ -32,7 +32,8 @@ export default {
 
     // Debugging options
     DEBUG: false,
-    MSG_DEBUGGING: false,
+    MSG_DEBUGGING: false, // Log all incoming and outgoing messages
+    MSGPACK_DEBUGGING: false, // Log URLs to the msgpack visualizer
     ICE_DEBUGGING: false,
 
 } as threema.Config;

+ 1 - 1
src/services/webclient.ts

@@ -2542,7 +2542,7 @@ export class WebClientService {
      */
     private handleIncomingMessageBytes(bytes: Uint8Array): void {
         this.$log.debug('New incoming message (' + bytes.byteLength + ' bytes)');
-        if (this.config.MSG_DEBUGGING) {
+        if (this.config.MSGPACK_DEBUGGING) {
             this.$log.debug('Incoming message payload: ' + msgpackVisualizer(bytes));
         }
 

+ 1 - 0
src/threema.d.ts

@@ -457,6 +457,7 @@ declare namespace threema {
         PUSH_URL: string;
         DEBUG: boolean;
         MSG_DEBUGGING: boolean;
+        MSGPACK_DEBUGGING: boolean;
         ICE_DEBUGGING: boolean;
     }