diff --git a/dsLightRag/Test/testPg2.py b/dsLightRag/Test/testPg2.py index f5434972..f457ca94 100644 --- a/dsLightRag/Test/testPg2.py +++ b/dsLightRag/Test/testPg2.py @@ -12,6 +12,20 @@ from Config.Config import EMBED_DIM, EMBED_MAX_TOKEN_SIZE, LLM_MODEL_NAME from Util.LightRagUtil import embedding_func, llm_model_func load_dotenv() + +# 在程序开始时添加以下配置 +logging.basicConfig( + level=logging.INFO, # 设置日志级别为INFO + format='%(asctime)s - %(name)s - %(levelname)s - %(message)s' +) + +# 或者如果你想更详细地控制日志输出 +logger = logging.getLogger('lightrag') +logger.setLevel(logging.INFO) +handler = logging.StreamHandler() +handler.setFormatter(logging.Formatter('%(asctime)s - %(name)s - %(levelname)s - %(message)s')) +logger.addHandler(handler) + ROOT_DIR = '.' WORKING_DIR = f"{ROOT_DIR}/dickens-pg"