From 1889f8dad599201c9957cffcf3e22b12ec779b96 Mon Sep 17 00:00:00 2001 From: Richard van der Hoff <1389908+richvdh@users.noreply.github.com> Date: Mon, 20 Nov 2023 18:17:06 +0000 Subject: [PATCH] Reduce console log spam (#3896) * Reduce console log spam A couple of different things: * Increase the `MaxListeners` setting on `MatrixClient` and `Thread`, so that we don't get "possible EventEmitter leak" warnings * Disable a couple of warnings/info lines that are just part of regular operation and are logged in large volumes. * another noisy log line * Reinstate warning about receipts for missing events Apparently this is being worked on --- src/client.ts | 3 +++ src/models/thread.ts | 3 +++ src/rust-crypto/RoomEncryptor.ts | 7 ++++--- src/rust-crypto/rust-crypto.ts | 4 ---- src/webrtc/groupCallEventHandler.ts | 1 - 5 files changed, 10 insertions(+), 8 deletions(-) diff --git a/src/client.ts b/src/client.ts index 542f18515..e08e3bee7 100644 --- a/src/client.ts +++ b/src/client.ts @@ -1494,6 +1494,9 @@ export class MatrixClient extends TypedEventEmitter new RustSdkCryptoJs.UserId(u.userId))).then(() => { - this.prefixedLogger.debug(`Updated tracked users for room ${room.roomId}`); - }); + this.olmMachine + .updateTrackedUsers(members.map((u) => new RustSdkCryptoJs.UserId(u.userId))) + .catch((e) => this.prefixedLogger.error("Error initializing tracked users", e)); } /** diff --git a/src/rust-crypto/rust-crypto.ts b/src/rust-crypto/rust-crypto.ts index fde74fe90..f0c3c8973 100644 --- a/src/rust-crypto/rust-crypto.ts +++ b/src/rust-crypto/rust-crypto.ts @@ -1560,10 +1560,6 @@ class EventDecryptor { ) {} public async attemptEventDecryption(event: MatrixEvent): Promise { - this.logger.info( - `Attempting decryption of event ${event.getId()} in ${event.getRoomId()} from ${event.getSender()}`, - ); - // add the event to the pending list *before* attempting to decrypt. // then, if the key turns up while decryption is in progress (and // decryption fails), we will schedule a retry. diff --git a/src/webrtc/groupCallEventHandler.ts b/src/webrtc/groupCallEventHandler.ts index 3dae0ce40..2db54f66b 100644 --- a/src/webrtc/groupCallEventHandler.ts +++ b/src/webrtc/groupCallEventHandler.ts @@ -133,7 +133,6 @@ export class GroupCallEventHandler { break; } - logger.debug(`GroupCallEventHandler createGroupCallForRoom() processed room (roomId=${room.roomId})`); this.getRoomDeferred(room.roomId).resolve!(); }