File tree Expand file tree Collapse file tree 1 file changed +5
-3
lines changed
Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -85,12 +85,14 @@ export const dnsHack = (): void => {
8585 isCalled = true ;
8686
8787 const cost = Date . now ( ) - start ;
88+ const addressStr = Array . isArray ( address )
89+ ? address . map ( ( a ) => `${ a . address } (IPv${ a . family } )` ) . join ( ", " )
90+ : address ;
8891 if ( ! err ) {
89- logger . debug ( `dns lookup [${ cost } ms]: ${ hostname } > ${ address } ` ) ;
92+ logger . debug ( `dns lookup [${ cost } ms]: ${ hostname } > ${ addressStr } ` ) ;
9093 eventBus . emit ( EVENT_LIST . DNS_LOOKUP_SUCCESS , address ) ;
9194 } else {
92- logger . error ( `dns lookup [${ cost } ms]: ${ hostname } > ${ address } ,
93- error: ${ err . stack } ` ) ;
95+ logger . error ( `dns lookup [${ cost } ms]: ${ hostname } > ${ addressStr } , error: ${ err . stack } ` ) ;
9496
9597 eventBus . emit ( EVENT_LIST . DNS_LOOKUP_ERROR , err ) ;
9698 }
You can’t perform that action at this time.
0 commit comments