From 853171f84fccf53e56c355e6dd8a808010ebe9ba Mon Sep 17 00:00:00 2001 From: hjdhjd Date: Mon, 24 Jun 2024 10:32:24 -0500 Subject: [PATCH] Correct the formatting and presentation of some recording-related debug and error logging. (#1040) --- src/lib/camera/RecordingManagement.ts | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/src/lib/camera/RecordingManagement.ts b/src/lib/camera/RecordingManagement.ts index 4357b84ea..06ffe7e66 100644 --- a/src/lib/camera/RecordingManagement.ts +++ b/src/lib/camera/RecordingManagement.ts @@ -588,7 +588,7 @@ export class RecordingManagement { // eslint-disable-next-line @typescript-eslint/no-use-before-define this.recordingStream = new CameraRecordingStream(connection, this.delegate, id, streamId); this.recordingStream.on(CameraRecordingStreamEvents.CLOSED, () => { - debug("[HDS %s] Removing active recoding session from recording management!"); + debug("[HDS %s] Removing active recoding session from recording management!", connection.remoteAddress); this.recordingStream = undefined; }); @@ -1056,8 +1056,8 @@ class CameraRecordingStream extends EventEmitter implements DataStreamProtocolHa if (!lastFragmentWasMarkedLast && !this.closed) { // Delegate violates the contract. Exited normally on a non-closed stream without properly setting `isLast`. - console.warn(`[HDS ${this.connection.remoteAddress}] Delegate finished streaming for ${this.streamId} without setting RecordingPacket.isLast. \ - Can't notify Controller about endOfStream!`); + console.warn(`[HDS ${this.connection.remoteAddress}] Delegate finished streaming for ${this.streamId} without setting RecordingPacket.isLast. ` + + "Can't notify Controller about endOfStream!"); } } catch (error) { if (this.closed) { @@ -1095,11 +1095,6 @@ class CameraRecordingStream extends EventEmitter implements DataStreamProtocolHa } } - if (initialization) { // we never actually sent anything out there! - console.warn(`[HDS ${this.connection.remoteAddress}] Delegate finished recording stream ${this.streamId} without sending anything out. \ - Controller will CANCEL.`); - } - debug("[HDS %s] Finished DATA_SEND transmission for stream %d!", this.connection.remoteAddress, this.streamId); }