From 99d2ef70f362b01a0709dd45045b95818c2d400b Mon Sep 17 00:00:00 2001 From: jingjingwu Date: Mon, 16 Mar 2026 10:18:40 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E6=94=B9=20address=20=E8=BE=93?= =?UTF-8?q?=E5=87=BA=E6=97=A5=E5=BF=97=E6=A0=BC=E5=BC=8F=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/core/runtime/dns.hack.ts | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/lib/core/runtime/dns.hack.ts b/lib/core/runtime/dns.hack.ts index 1174a203..a7a34844 100644 --- a/lib/core/runtime/dns.hack.ts +++ b/lib/core/runtime/dns.hack.ts @@ -85,12 +85,14 @@ export const dnsHack = (): void => { isCalled = true; const cost = Date.now() - start; + const addressStr = Array.isArray(address) + ? address.map((a) => `${a.address}(IPv${a.family})`).join(", ") + : address; if (!err) { - logger.debug(`dns lookup [${cost}ms]: ${hostname} > ${address}`); + logger.debug(`dns lookup [${cost}ms]: ${hostname} > ${addressStr}`); eventBus.emit(EVENT_LIST.DNS_LOOKUP_SUCCESS, address); } else { - logger.error(`dns lookup [${cost}ms]: ${hostname} > ${address}, - error: ${err.stack}`); + logger.error(`dns lookup [${cost}ms]: ${hostname} > ${addressStr}, error: ${err.stack}`); eventBus.emit(EVENT_LIST.DNS_LOOKUP_ERROR, err); }