From 0e40e6d3e954066aabe8cde09b9152addaff3614 Mon Sep 17 00:00:00 2001 From: Ben Noordhuis Date: Tue, 11 Apr 2017 17:31:54 +0200 Subject: [PATCH] net: don't concatenate strings in debug logging Not necessary, not a good idea. PR-URL: https://github.com/nodejs/node/pull/12342 Reviewed-By: Benjamin Gruenbaum Reviewed-By: Colin Ihrig Reviewed-By: Evan Lucas Reviewed-By: James M Snell Reviewed-By: Luigi Pinca --- lib/net.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/net.js b/lib/net.js index 4e76dfac06c7e8..a9bb212120e326 100644 --- a/lib/net.js +++ b/lib/net.js @@ -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; @@ -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); @@ -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);