From 809035daacc9584c84920c474096d4c01b2e3db4 Mon Sep 17 00:00:00 2001 From: Junyan Chin Date: Tue, 17 Feb 2026 22:19:51 +0800 Subject: [PATCH] Update src/langbot/pkg/platform/sources/satori.py Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --- src/langbot/pkg/platform/sources/satori.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/langbot/pkg/platform/sources/satori.py b/src/langbot/pkg/platform/sources/satori.py index 43db1aa3..edf2da0b 100644 --- a/src/langbot/pkg/platform/sources/satori.py +++ b/src/langbot/pkg/platform/sources/satori.py @@ -645,10 +645,15 @@ class SatoriAdapter(abstract_platform_adapter.AbstractMessagePlatformAdapter): message_id = str(message.get('id', '') or '') message_content = str(message.get('content', '') or '') - # Log received message (truncate long content) + # Log received message (truncate long content for debug preview) log_content = message_content[:100] + '...' if len(message_content) > 100 else message_content + # At info level, avoid logging raw content to protect privacy and reduce log volume await self.logger.info( - f"Satori 消息接收: 用户ID={user_id}, 用户名={user_name}, 内容长度={len(message_content)}, 预览='{log_content}'" + f"Satori 消息接收: 用户ID={user_id}, 用户名={user_name}, 内容长度={len(message_content)}, 消息ID={message_id}" + ) + # Detailed content preview only at debug level + await self.logger.debug( + f"Satori 消息内容预览: 用户ID={user_id}, 消息ID={message_id}, 预览='{log_content}'" ) # Convert message content