Skip to content

Commit

Permalink
net: don't concatenate strings in debug logging
Browse files Browse the repository at this point in the history
Not necessary, not a good idea.

PR-URL: #12342
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Evan Lucas <evanlucas@me.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
  • Loading branch information
bnoordhuis authored and evanlucas committed May 2, 2017
1 parent d0b1be1 commit 0e40e6d
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lib/net.js
Original file line number Diff line number Diff line change
Expand Up @@ -985,7 +985,7 @@ function lookupAndConnect(self, options) {
dnsopts.hints = dns.ADDRCONFIG;
}

debug('connect: find host ' + host);
debug('connect: find host', host);
debug('connect: dns options', dnsopts);
self._host = host;
var lookup = options.lookup || dns.lookup;
Expand Down Expand Up @@ -1160,7 +1160,7 @@ function createServerHandle(address, port, addressType, fd) {
handle = createHandle(fd);
} catch (e) {
// Not a fd we can listen on. This will trigger an error.
debug('listen invalid fd=' + fd + ': ' + e.message);
debug('listen invalid fd=%d:', fd, e.message);
return uv.UV_EINVAL;
}
handle.open(fd);
Expand All @@ -1181,7 +1181,7 @@ function createServerHandle(address, port, addressType, fd) {
}

if (address || port || isTCP) {
debug('bind to ' + (address || 'anycast'));
debug('bind to', address || 'any');
if (!address) {
// Try binding to ipv6 first
err = handle.bind6('::', port);
Expand Down

0 comments on commit 0e40e6d

Please sign in to comment.