refactor(logger): 为base_tool和person_info模块添加自定义日志配置

为base_tool和person_info模块引入自定义日志配置,提升日志输出的可读性和一致性。分别在logger.py中新增BASE_TOOL_STYLE_CONFIG和PERSON_INFO_STYLE_CONFIG配置,并在相应模块中应用这些配置。
This commit is contained in:
墨梓柒
2025-04-23 23:24:08 +08:00
parent 7281c13a12
commit 6da2a77b78
3 changed files with 52 additions and 4 deletions

View File

@@ -3,9 +3,14 @@ import inspect
import importlib
import pkgutil
import os
from src.common.logger import get_module_logger
from src.common.logger import get_module_logger, LogConfig, BASE_TOOL_STYLE_CONFIG
logger = get_module_logger("base_tool")
base_tool_log_config = LogConfig(
console_format=BASE_TOOL_STYLE_CONFIG["console_format"],
file_format=BASE_TOOL_STYLE_CONFIG["file_format"],
)
logger = get_module_logger("base_tool", config=base_tool_log_config)
# 工具注册表
TOOL_REGISTRY = {}