refactor(log): 精简聊天相关模块的日志输出

为了提高日志的可读性和实用性,对聊天核心流程(兴趣评分、兴趣系统、规划执行)中的日志记录进行了全面优化。

主要变更:
- 移除装饰性的分割线和表情符号,使日志格式更加统一和专业。
- 将多行分散的日志信息合并为单行,提高信息密度,方便快速浏览。
- 调整日志用语,使其更加简洁、客观,便于程序解析和人工阅读。

这些改动旨在使生产环境中的日志更易于追踪和调试,同时保持了关键信息的完整性。
This commit is contained in:
tt-P607
2025-09-21 20:40:00 +08:00
committed by Windpicker-owo
parent 3a291b3f2a
commit 956d206675
4 changed files with 78 additions and 118 deletions

View File

@@ -128,7 +128,7 @@ class ActionPlanner:
reply_not_available = False
if not should_reply and "reply" in initial_plan.available_actions:
logger.info(f"消息兴趣度不足({latest_score.total_score:.2f}),移除reply动作")
logger.info(f"兴趣度不足 ({latest_score.total_score:.2f}),移除'回复'动作")
reply_not_available = True
# base_threshold = self.interest_scoring.reply_threshold
@@ -136,9 +136,8 @@ class ActionPlanner:
non_reply_action_interest_threshold = global_config.affinity_flow.non_reply_action_interest_threshold
if score < non_reply_action_interest_threshold:
logger.info(
f"兴趣度不足非回复动作阈值: {score:.3f} < {non_reply_action_interest_threshold:.3f}直接返回no_action"
f"兴趣度 {score:.3f} 低于非回复动作阈值 {non_reply_action_interest_threshold:.3f}不执行任何动作。"
)
logger.info(f"📊 最低要求: {non_reply_action_interest_threshold:.3f}")
# 直接返回 no_action
from src.common.data_models.info_data_model import ActionPlannerInfo