From 3be1479becc3dd951a9d8af05d8072bb4e152787 Mon Sep 17 00:00:00 2001 From: skamenan7 Date: Tue, 7 Oct 2025 10:55:55 -0400 Subject: [PATCH] Remove debug logging gate per review feedback Simplified logging to always execute instead of gating behind isEnabledFor check. Main fix is using safe chunk.document_id property instead of direct metadata access. --- llama_stack/core/routers/vector_io.py | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/llama_stack/core/routers/vector_io.py b/llama_stack/core/routers/vector_io.py index 26469db2d..56070a1de 100644 --- a/llama_stack/core/routers/vector_io.py +++ b/llama_stack/core/routers/vector_io.py @@ -5,7 +5,6 @@ # the root directory of this source tree. import asyncio -import logging # allow-direct-logging import uuid from typing import Any @@ -102,12 +101,11 @@ class VectorIORouter(VectorIO): chunks: list[Chunk], ttl_seconds: int | None = None, ) -> None: - if logger.isEnabledFor(logging.DEBUG): - doc_ids = [chunk.document_id for chunk in chunks[:3]] - logger.debug( - f"VectorIORouter.insert_chunks: {vector_db_id}, {len(chunks)} chunks, " - f"ttl_seconds={ttl_seconds}, chunk_ids={doc_ids}{' and more...' if len(chunks) > 3 else ''}" - ) + doc_ids = [chunk.document_id for chunk in chunks[:3]] + logger.debug( + f"VectorIORouter.insert_chunks: {vector_db_id}, {len(chunks)} chunks, " + f"ttl_seconds={ttl_seconds}, chunk_ids={doc_ids}{' and more...' if len(chunks) > 3 else ''}" + ) provider = await self.routing_table.get_provider_impl(vector_db_id) await provider.insert_chunks(vector_db_id, chunks, ttl_seconds)