Skip to content

Commit 0e40e6d

Browse files
bnoordhuisevanlucas
authored andcommitted
net: don't concatenate strings in debug logging
Not necessary, not a good idea. PR-URL: #12342 Reviewed-By: Benjamin Gruenbaum <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Evan Lucas <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Luigi Pinca <[email protected]>
1 parent d0b1be1 commit 0e40e6d

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

lib/net.js

+3-3
Original file line numberDiff line numberDiff line change
@@ -985,7 +985,7 @@ function lookupAndConnect(self, options) {
985985
dnsopts.hints = dns.ADDRCONFIG;
986986
}
987987

988-
debug('connect: find host ' + host);
988+
debug('connect: find host', host);
989989
debug('connect: dns options', dnsopts);
990990
self._host = host;
991991
var lookup = options.lookup || dns.lookup;
@@ -1160,7 +1160,7 @@ function createServerHandle(address, port, addressType, fd) {
11601160
handle = createHandle(fd);
11611161
} catch (e) {
11621162
// Not a fd we can listen on. This will trigger an error.
1163-
debug('listen invalid fd=' + fd + ': ' + e.message);
1163+
debug('listen invalid fd=%d:', fd, e.message);
11641164
return uv.UV_EINVAL;
11651165
}
11661166
handle.open(fd);
@@ -1181,7 +1181,7 @@ function createServerHandle(address, port, addressType, fd) {
11811181
}
11821182

11831183
if (address || port || isTCP) {
1184-
debug('bind to ' + (address || 'anycast'));
1184+
debug('bind to', address || 'any');
11851185
if (!address) {
11861186
// Try binding to ipv6 first
11871187
err = handle.bind6('::', port);

0 commit comments

Comments
 (0)