Optimize logger for storage

This commit is contained in:
yangdx
2025-04-10 01:06:46 +08:00
parent 5d286dd0fa
commit ad087073aa
5 changed files with 7 additions and 7 deletions

View File

@@ -116,7 +116,7 @@ class JsonDocStatusStorage(DocStatusStorage):
""" """
if not data: if not data:
return return
logger.info(f"Inserting {len(data)} records to {self.namespace}") logger.debug(f"Inserting {len(data)} records to {self.namespace}")
async with self._storage_lock: async with self._storage_lock:
self._data.update(data) self._data.update(data)
await set_all_update_flags(self.namespace) await set_all_update_flags(self.namespace)

View File

@@ -121,7 +121,7 @@ class JsonKVStorage(BaseKVStorage):
""" """
if not data: if not data:
return return
logger.info(f"Inserting {len(data)} records to {self.namespace}") logger.debug(f"Inserting {len(data)} records to {self.namespace}")
async with self._storage_lock: async with self._storage_lock:
self._data.update(data) self._data.update(data)
await set_all_update_flags(self.namespace) await set_all_update_flags(self.namespace)

View File

@@ -85,7 +85,7 @@ class NanoVectorDBStorage(BaseVectorStorage):
KG-storage-log should be used to avoid data corruption KG-storage-log should be used to avoid data corruption
""" """
logger.info(f"Inserting {len(data)} to {self.namespace}") logger.debug(f"Inserting {len(data)} to {self.namespace}")
if not data: if not data:
return return

View File

@@ -392,7 +392,7 @@ class NetworkXStorage(BaseGraphStorage):
# Check if storage was updated by another process # Check if storage was updated by another process
if self.storage_updated.value: if self.storage_updated.value:
# Storage was updated by another process, reload data instead of saving # Storage was updated by another process, reload data instead of saving
logger.warning( logger.info(
f"Graph for {self.namespace} was updated by another process, reloading..." f"Graph for {self.namespace} was updated by another process, reloading..."
) )
self._graph = ( self._graph = (

View File

@@ -361,7 +361,7 @@ class PGKVStorage(BaseKVStorage):
################ INSERT METHODS ################ ################ INSERT METHODS ################
async def upsert(self, data: dict[str, dict[str, Any]]) -> None: async def upsert(self, data: dict[str, dict[str, Any]]) -> None:
logger.info(f"Inserting {len(data)} to {self.namespace}") logger.debug(f"Inserting {len(data)} to {self.namespace}")
if not data: if not data:
return return
@@ -560,7 +560,7 @@ class PGVectorStorage(BaseVectorStorage):
return upsert_sql, data return upsert_sql, data
async def upsert(self, data: dict[str, dict[str, Any]]) -> None: async def upsert(self, data: dict[str, dict[str, Any]]) -> None:
logger.info(f"Inserting {len(data)} to {self.namespace}") logger.debug(f"Inserting {len(data)} to {self.namespace}")
if not data: if not data:
return return
@@ -949,7 +949,7 @@ class PGDocStatusStorage(DocStatusStorage):
Args: Args:
data: dictionary of document IDs and their status data data: dictionary of document IDs and their status data
""" """
logger.info(f"Inserting {len(data)} to {self.namespace}") logger.debug(f"Inserting {len(data)} to {self.namespace}")
if not data: if not data:
return return