chore: logger

This commit is contained in:
手瓜一十雪
2024-08-14 23:03:24 +08:00
parent 1d64fa4817
commit 11ea92c078

View File

@@ -44,14 +44,16 @@ export class OB11ActiveHttpAdapter implements IOB11NetworkAdapter {
resJson = await res.json(); resJson = await res.json();
//logDebug('新消息事件HTTP上报返回快速操作: ', JSON.stringify(resJson)); //logDebug('新消息事件HTTP上报返回快速操作: ', JSON.stringify(resJson));
} catch (e) { } catch (e) {
this.logger.logDebug('新消息事件HTTP上报没有返回快速操作不需要处理'); this.logger.logDebug('[OneBot] [Http Client] 新消息事件HTTP上报没有返回快速操作不需要处理');
return; return;
} }
try { try {
handleQuickOperation(this.coreContext, this.obContext, event as QuickActionEvent, resJson).then().catch(this.logger.logError); handleQuickOperation(this.coreContext, this.obContext, event as QuickActionEvent, resJson).then().catch(this.logger.logError);
} catch (e: any) { } 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);
}); });
} }