mirror of
https://github.com/zebrajr/node.git
synced 2025-12-06 12:20:27 +01:00
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 <jasnell@gmail.com> Reviewed-By: Zeyu Yang <himself65@outlook.com>
This commit is contained in:
parent
d2c0800596
commit
25656109db
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user