From fe984ede6e28dc31e58621a56c6c4bb2ccf403d8 Mon Sep 17 00:00:00 2001 From: Hugh Nimmo-Smith Date: Fri, 23 Aug 2024 20:04:22 +0100 Subject: [PATCH] Use prefixed loggers for MatrixRTC (#4378) --- src/matrixrtc/MatrixRTCSession.ts | 4 +++- src/matrixrtc/MatrixRTCSessionManager.ts | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/src/matrixrtc/MatrixRTCSession.ts b/src/matrixrtc/MatrixRTCSession.ts index c5b73a3fd01..4b26134e728 100644 --- a/src/matrixrtc/MatrixRTCSession.ts +++ b/src/matrixrtc/MatrixRTCSession.ts @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -import { logger } from "../logger"; +import { logger as rootLogger } from "../logger"; import { TypedEventEmitter } from "../models/typed-event-emitter"; import { EventTimeline } from "../models/event-timeline"; import { Room } from "../models/room"; @@ -39,6 +39,8 @@ import { MatrixEvent } from "../models/event"; import { isLivekitFocusActive } from "./LivekitFocus"; import { ExperimentalGroupCallRoomMemberState } from "../webrtc/groupCall"; +const logger = rootLogger.getChild("MatrixRTCSession"); + const MEMBERSHIP_EXPIRY_TIME = 60 * 60 * 1000; const MEMBER_EVENT_CHECK_PERIOD = 2 * 60 * 1000; // How often we check to see if we need to re-send our member event const CALL_MEMBER_EVENT_RETRY_DELAY_MIN = 3000; diff --git a/src/matrixrtc/MatrixRTCSessionManager.ts b/src/matrixrtc/MatrixRTCSessionManager.ts index 22480cffc9f..d59cee218ac 100644 --- a/src/matrixrtc/MatrixRTCSessionManager.ts +++ b/src/matrixrtc/MatrixRTCSessionManager.ts @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -import { logger } from "../logger"; +import { logger as rootLogger } from "../logger"; import { MatrixClient, ClientEvent } from "../client"; import { TypedEventEmitter } from "../models/typed-event-emitter"; import { Room, RoomEvent } from "../models/room"; @@ -23,6 +23,8 @@ import { MatrixEvent } from "../models/event"; import { MatrixRTCSession } from "./MatrixRTCSession"; import { EventType } from "../@types/event"; +const logger = rootLogger.getChild("MatrixRTCSessionManager"); + export enum MatrixRTCSessionManagerEvents { // A member has joined the MatrixRTC session, creating an active session in a room where there wasn't previously SessionStarted = "session_started",