refactor: 重构所有模块对于logger的初始化方式(可能不全)

This commit is contained in:
AL76
2025-03-15 15:10:58 +08:00
parent 61fcc83049
commit ea88420ae2
24 changed files with 72 additions and 51 deletions

View File

@@ -7,7 +7,9 @@ import jieba
import matplotlib.pyplot as plt
import networkx as nx
from dotenv import load_dotenv
from loguru import logger
from src.common.logger import get_module_logger
logger = get_module_logger("draw_memory")
# 添加项目根目录到 Python 路径
root_path = os.path.abspath(os.path.join(os.path.dirname(__file__), "../../.."))

View File

@@ -3,7 +3,6 @@ import datetime
import math
import random
import time
import os
import jieba
import networkx as nx
@@ -18,14 +17,9 @@ from ..chat.utils import (
text_to_vector,
)
from ..models.utils_model import LLM_request
from src.common.logger import get_module_logger
from ..utils.logger_config import LogClassification, LogModule
# 配置日志
log_module = LogModule()
logger = log_module.setup_logger(LogClassification.MEMORY)
logger.info("初始化记忆系统")
logger = get_module_logger("memory_sys")
class Memory_graph: