refactor: unify core pipeline logging with cs_agent logger
This commit is contained in:
@@ -1,9 +1,12 @@
|
||||
from __future__ import annotations
|
||||
|
||||
import os
|
||||
import logging
|
||||
from collections import Counter
|
||||
from datetime import datetime
|
||||
|
||||
logger = logging.getLogger("cs_agent")
|
||||
|
||||
|
||||
def calc_avg_complexity(complexity_history: list) -> str:
|
||||
"""计算平均复杂度。"""
|
||||
@@ -153,7 +156,7 @@ def get_customer_profile_context(agent, customer_id: str) -> str:
|
||||
|
||||
return "\n".join(lines)
|
||||
except Exception as e:
|
||||
print(f"[Agent] 获取客户画像失败: {e}")
|
||||
logger.exception("[Agent] 获取客户画像失败: %s", e)
|
||||
return ""
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user