From bdb8d326a59f1c259cd8c584bcb44affa70a9565 Mon Sep 17 00:00:00 2001 From: SergeantPanda Date: Wed, 30 Apr 2025 12:17:11 -0500 Subject: [PATCH] Add better logging for which channel clients are getting chunks from. --- apps/proxy/ts_proxy/stream_generator.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/apps/proxy/ts_proxy/stream_generator.py b/apps/proxy/ts_proxy/stream_generator.py index 17e53b9d..26ed3a6b 100644 --- a/apps/proxy/ts_proxy/stream_generator.py +++ b/apps/proxy/ts_proxy/stream_generator.py @@ -208,7 +208,7 @@ class StreamGenerator: # Log empty reads periodically if self.empty_reads % 50 == 0: stream_status = "healthy" if (self.stream_manager and self.stream_manager.healthy) else "unknown" - logger.debug(f"[{self.client_id}] Waiting for chunks beyond {self.local_index} (buffer at {self.buffer.index}, stream: {stream_status})") + logger.debug(f"[{self.client_id}] Waiting for chunks beyond {self.local_index} for channel: {self.channel_id} (buffer at {self.buffer.index}, stream: {stream_status})") # Check for ghost clients if self._is_ghost_client(self.local_index): @@ -277,7 +277,7 @@ class StreamGenerator: yield chunk self.bytes_sent += len(chunk) self.chunks_sent += 1 - logger.debug(f"[{self.client_id}] Sent chunk {self.chunks_sent} ({len(chunk)} bytes) to client") + logger.debug(f"[{self.client_id}] Sent chunk {self.chunks_sent} ({len(chunk)} bytes) for channel {self.channel_id} to client") current_time = time.time()