I am using the cluster module for nodejs .
Here's how I set it up:
var cluster = require('cluster'); if (cluster.isMaster) { var numCPUs = require('os').cpus().length; for (var i = 0; i < numCPUs; i++) { cluster.fork(); } }else{ console.log("Turkey Test"); }
Now I impose 6 threads (6 cores) on my computer. So, when debugging my application and reading data from the console, it will look:

Is there a way to output console.log only once, regardless of how many clusters are running?
Nick newman
source share