Add process ID to log messages for better multi-process debugging clarity

- Add PID to KV and Neo4j storage  logs
- Add PID to query context logs
- Improve KV data count logging for llm cache
This commit is contained in:
yangdx
2025-03-09 15:25:10 +08:00
parent 90527875fd
commit c854aabde0
4 changed files with 30 additions and 5 deletions

View File

@@ -3,6 +3,7 @@ from __future__ import annotations
import asyncio
import json
import re
import os
from typing import Any, AsyncIterator
from collections import Counter, defaultdict
@@ -1027,6 +1028,7 @@ async def _build_query_context(
text_chunks_db: BaseKVStorage,
query_param: QueryParam,
):
logger.info(f"Process {os.getpid()} buidling query context...")
if query_param.mode == "local":
entities_context, relations_context, text_units_context = await _get_node_data(
ll_keywords,