Merge pull request #10752 from NovoNordisk-OpenSource/yvedeng/standardize-logging

refactor: replace print statements with logging
This commit is contained in:
Timothy Jaeryang Baek
2025-02-25 10:53:02 -08:00
committed by GitHub
34 changed files with 171 additions and 103 deletions

View File

@@ -1912,7 +1912,8 @@ async def process_chat_response(
}
)
print(content_blocks, serialize_content_blocks(content_blocks))
log.info(f"content_blocks={content_blocks}")
log.info(f"serialize_content_blocks={serialize_content_blocks(content_blocks)}")
try:
res = await generate_chat_completion(
@@ -1983,7 +1984,7 @@ async def process_chat_response(
await background_tasks_handler()
except asyncio.CancelledError:
print("Task was cancelled!")
log.warning("Task was cancelled!")
await event_emitter({"type": "task-cancelled"})
if not ENABLE_REALTIME_CHAT_SAVE: