From 746e5672f39a655748bdd67530e5a0415cf42818 Mon Sep 17 00:00:00 2001 From: lishuceo Date: Wed, 11 Mar 2026 21:27:35 +0800 Subject: [PATCH] fix: upgrade diagnostic logs from debug to info level Production LOG_LEVEL is info, debug logs were invisible. Temporary change to capture history dedup pipeline data. Co-Authored-By: Claude Opus 4.6 --- src/feishu/client.ts | 2 +- src/feishu/event-handler.ts | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/feishu/client.ts b/src/feishu/client.ts index 013e167e..4d368de1 100644 --- a/src/feishu/client.ts +++ b/src/feishu/client.ts @@ -580,7 +580,7 @@ export class FeishuClient { }); } // 诊断:记录消息获取和过滤的详情 - logger.debug( + logger.info( { containerId, containerType, diff --git a/src/feishu/event-handler.ts b/src/feishu/event-handler.ts index 3c4f151e..ab42faca 100644 --- a/src/feishu/event-handler.ts +++ b/src/feishu/event-handler.ts @@ -1676,12 +1676,12 @@ async function executeDirectTask( let effectivePrompt = promptWithTime; const afterMsgId = activeConversationId ? _historyDedup.get(sessionKey) : undefined; - logger.debug( + logger.info( { sessionKey, afterMsgId, hasConversationId: !!activeConversationId, currentMessageId: messageId, rootId }, 'History dedup state before buildDirectTaskHistory', ); const history = await buildDirectTaskHistory(chatId, eventThreadId, messageId, afterMsgId, selfBotOpenIds); - logger.debug( + logger.info( { sessionKey, hasHistoryText: !!history.text, historyLen: history.text?.length, newestMsgId: history.newestMsgId }, 'buildDirectTaskHistory result', ); @@ -1854,13 +1854,13 @@ async function buildDirectTaskHistory( messages = messages.slice(idx + 1); } // afterMsgId 不在列表中 → 可能消息已过期滚动,注入全部 - logger.debug( + logger.info( { chatId, afterMsgId, foundIdx: messages.length !== beforeDedupFilter ? 'found' : 'not_found', beforeDedup: beforeDedupFilter, afterDedup: messages.length }, 'History afterMsgId dedup applied', ); } - logger.debug( + logger.info( { chatId, threadId,