From 391a978a3ac23c294dc0fc3820590af2256b4e88 Mon Sep 17 00:00:00 2001 From: Daniel McKnight Date: Tue, 8 Oct 2024 09:16:33 -0700 Subject: [PATCH] Address logging review comments --- neon_hana/app/routers/node_server.py | 3 ++- neon_hana/streaming_client.py | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/neon_hana/app/routers/node_server.py b/neon_hana/app/routers/node_server.py index b6a3a34..90444bd 100644 --- a/neon_hana/app/routers/node_server.py +++ b/neon_hana/app/routers/node_server.py @@ -30,6 +30,7 @@ from typing import Optional, Union from fastapi import APIRouter, WebSocket, HTTPException +from ovos_utils import LOG from starlette.websockets import WebSocketDisconnect from neon_hana.app.dependencies import config, client_manager @@ -99,7 +100,7 @@ async def node_v1_stream_endpoint(websocket: WebSocket, token: str): except WebSocketDisconnect: disconnect_event.set() except Exception as e: - print(e) + LOG.error(e) finally: client_manager.disconnect_stream() diff --git a/neon_hana/streaming_client.py b/neon_hana/streaming_client.py index 536c9d6..c3263a7 100644 --- a/neon_hana/streaming_client.py +++ b/neon_hana/streaming_client.py @@ -92,7 +92,7 @@ async def _send_bytes(audio_bytes: bytes): wav_audio_bytes = b64decode(encoded_audio) LOG.info(f"Sending {len(wav_audio_bytes)} bytes of audio") run(_send_bytes(wav_audio_bytes)) - LOG.info(f"Sent {i} binary audio response") + LOG.info(f"Sent {i} binary audio response(s)") def on_chunk(self, chunk: ChunkInfo): LOG.debug(f"Chunk: {chunk}")