chore(log): 移除调试日志并将部分日志级别降为debug

将规划器和过滤器中的临时调试日志移除,并将部分用于追踪流程的info级别日志调整为debug级别,以减少在生产环境中的日志噪音。

同时,在`cycle_processor.py`中增加了对事件处理结果的空值检查,以增强代码的健壮性。(也许是bug真的能修好了——)
This commit is contained in:
minecraft1024a
2025-09-14 14:59:32 +08:00
committed by Windpicker-owo
parent dc5ee7b150
commit cbbb5746ce
2 changed files with 13 additions and 10 deletions

View File

@@ -42,18 +42,18 @@ class PlanFilter:
"""
执行筛选逻辑,并填充 Plan 对象的 decided_actions 字段。
"""
logger.info(f"墨墨在这里加了日志 -> filter 入口 plan: {plan}")
logger.debug(f"墨墨在这里加了日志 -> filter 入口 plan: {plan}")
try:
prompt, used_message_id_list = await self._build_prompt(plan)
plan.llm_prompt = prompt
logger.info(f"墨墨在这里加了日志 -> LLM prompt: {prompt}")
logger.debug(f"墨墨在这里加了日志 -> LLM prompt: {prompt}")
llm_content, _ = await self.planner_llm.generate_response_async(prompt=prompt)
if llm_content:
logger.warning(f"墨墨在这里加了日志 -> LLM a原始返回: {llm_content}")
logger.debug(f"墨墨在这里加了日志 -> LLM a原始返回: {llm_content}")
parsed_json = orjson.loads(repair_json(llm_content))
logger.info(f"墨墨在这里加了日志 -> 解析后的 JSON: {parsed_json}")
logger.debug(f"墨墨在这里加了日志 -> 解析后的 JSON: {parsed_json}")
if isinstance(parsed_json, dict):
parsed_json = [parsed_json]
@@ -95,7 +95,7 @@ class PlanFilter:
ActionPlannerInfo(action_type="no_action", reasoning=f"筛选时出错: {e}")
]
logger.info(f"墨墨在这里加了日志 -> filter 出口 decided_actions: {plan.decided_actions}")
logger.debug(f"墨墨在这里加了日志 -> filter 出口 decided_actions: {plan.decided_actions}")
return plan
async def _build_prompt(self, plan: Plan) -> tuple[str, list]: