From 2f72054ec774d55c9cceac14138f35c683b65bdc Mon Sep 17 00:00:00 2001 From: Agustin Daguerre Date: Mon, 6 Apr 2020 18:03:12 -0300 Subject: [PATCH] test: replace console.log/error with debuglog Use utility debug logs instead of console logs in test-cluster-setup-master-multiple.js Refs: https://github.com/nodejs/node/issues/32678 PR-URL: https://github.com/nodejs/node/pull/32695 Reviewed-By: James M Snell Reviewed-By: Zeyu Yang --- test/parallel/test-cluster-setup-master-multiple.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/test/parallel/test-cluster-setup-master-multiple.js b/test/parallel/test-cluster-setup-master-multiple.js index 33d490df45f57a..11434edb90048a 100644 --- a/test/parallel/test-cluster-setup-master-multiple.js +++ b/test/parallel/test-cluster-setup-master-multiple.js @@ -23,6 +23,7 @@ require('../common'); const assert = require('assert'); const cluster = require('cluster'); +const debug = require('util').debuglog('test'); assert(cluster.isMaster); @@ -36,7 +37,7 @@ const configs = []; // Capture changes cluster.on('setup', () => { - console.log('"setup" emitted', cluster.settings); + debug(`"setup" emitted ${JSON.stringify(cluster.settings)}`); configs.push(cheapClone(cluster.settings)); }); @@ -65,5 +66,5 @@ execs.forEach((v, i) => { // Cluster emits 'setup' asynchronously, so we must stay alive long // enough for that to happen setTimeout(() => { - console.log('cluster setup complete'); + debug('cluster setup complete'); }, (execs.length + 1) * 100);