Skip to content

Commit 2f72054

Browse files
agustindaguerretargos
authored andcommittedApr 22, 2020
test: replace console.log/error with debuglog
Use utility debug logs instead of console logs in test-cluster-setup-master-multiple.js Refs: #32678 PR-URL: #32695 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Zeyu Yang <himself65@outlook.com>
1 parent ae772b7 commit 2f72054

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed
 

‎test/parallel/test-cluster-setup-master-multiple.js

+3-2
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323
require('../common');
2424
const assert = require('assert');
2525
const cluster = require('cluster');
26+
const debug = require('util').debuglog('test');
2627

2728
assert(cluster.isMaster);
2829

@@ -36,7 +37,7 @@ const configs = [];
3637

3738
// Capture changes
3839
cluster.on('setup', () => {
39-
console.log('"setup" emitted', cluster.settings);
40+
debug(`"setup" emitted ${JSON.stringify(cluster.settings)}`);
4041
configs.push(cheapClone(cluster.settings));
4142
});
4243

@@ -65,5 +66,5 @@ execs.forEach((v, i) => {
6566
// Cluster emits 'setup' asynchronously, so we must stay alive long
6667
// enough for that to happen
6768
setTimeout(() => {
68-
console.log('cluster setup complete');
69+
debug('cluster setup complete');
6970
}, (execs.length + 1) * 100);

0 commit comments

Comments
 (0)
Please sign in to comment.