From ea4d1d32759d22ff9ea17a84a4ba1bf84593606c Mon Sep 17 00:00:00 2001 From: "Wesley F. Young" Date: Mon, 12 Aug 2024 11:20:48 +0800 Subject: [PATCH] feat: logging for hot reload --- src/onebot/index.ts | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/onebot/index.ts b/src/onebot/index.ts index 71fb452d..de1f86af 100644 --- a/src/onebot/index.ts +++ b/src/onebot/index.ts @@ -121,6 +121,13 @@ export class NapCatOneBot11Adapter { } private async reloadNetwork(prev: OB11Config, now: OB11Config) { + const serviceInfo = ` + HTTP服务 ${now.http.enable ? '已启动' : '未启动'}, ${now.http.host}:${now.http.port} + HTTP上报服务 ${now.http.enablePost ? '已启动' : '未启动'}, 上报地址: ${now.http.postUrls} + WebSocket服务 ${now.ws.enable ? '已启动' : '未启动'}, ${now.ws.host}:${now.ws.port} + WebSocket反向服务 ${now.reverseWs.enable ? '已启动' : '未启动'}, 反向地址: ${now.reverseWs.urls}`; + this.context.logger.log(`[Notice] [OneBot11] 热重载完成 ${serviceInfo}`); + // check difference in passive http (Http) if (prev.http.enable !== now.http.enable) { if (now.http.enable) {