From 388efbbf45266e1a02d1e596690e75e4ac6447be Mon Sep 17 00:00:00 2001 From: Jeff Barczewski Date: Tue, 15 Jan 2013 13:55:25 -0600 Subject: [PATCH] export debug Export debug() so server can write debug output to both stdout and any REPL's. --- README.md | 9 +++++++++ cluster-master.js | 1 + 2 files changed, 10 insertions(+) diff --git a/README.md b/README.md index 5a3fb6a..2cdc128 100644 --- a/README.md +++ b/README.md @@ -71,6 +71,15 @@ Gracefully shut down the worker nodes and then process.exit(0). Forcibly shut down the worker nodes and then process.exit(1). +### clusterMaster.debug(arg1, arg2, ...) + +Arguments passed to debug are formatted with util.format and output +to stdout and any REPL's. + +```javascript +clusterMaster.debug('The number one is %s', 1); +``` + ## Configs The `exec`, `env`, `argv`, and `silent` configs are passed to the diff --git a/cluster-master.js b/cluster-master.js index 555d18c..9f26ce8 100644 --- a/cluster-master.js +++ b/cluster-master.js @@ -14,6 +14,7 @@ var cluster = require("cluster") , util = require('util') exports = module.exports = clusterMaster +exports.debug = debug exports.restart = restart exports.resize = resize exports.quitHard = quitHard