From 11ea92c078b4c5f02cf81df783a4ca510c0490a8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=89=8B=E7=93=9C=E4=B8=80=E5=8D=81=E9=9B=AA?= Date: Wed, 14 Aug 2024 23:03:24 +0800 Subject: [PATCH] chore: logger --- src/onebot/network/active-http.ts | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/onebot/network/active-http.ts b/src/onebot/network/active-http.ts index 49154aee..f055fbde 100644 --- a/src/onebot/network/active-http.ts +++ b/src/onebot/network/active-http.ts @@ -44,14 +44,16 @@ export class OB11ActiveHttpAdapter implements IOB11NetworkAdapter { resJson = await res.json(); //logDebug('新消息事件HTTP上报返回快速操作: ', JSON.stringify(resJson)); } catch (e) { - this.logger.logDebug('新消息事件HTTP上报没有返回快速操作,不需要处理'); + this.logger.logDebug('[OneBot] [Http Client] 新消息事件HTTP上报没有返回快速操作,不需要处理'); return; } try { handleQuickOperation(this.coreContext, this.obContext, event as QuickActionEvent, resJson).then().catch(this.logger.logError); } catch (e: any) { - this.logger.logError('新消息事件HTTP上报返回快速操作失败', e); + this.logger.logError('[OneBot] [Http Client] 新消息事件HTTP上报返回快速操作失败', e); } + }).catch((e) => { + this.logger.logError('[OneBot] [Http Client] 新消息事件HTTP上报失败', e); }); }