Browse Source

sys: print stack trace if NODE_DEBUG=sys

v0.7.4-release
Ben Noordhuis 13 years ago
parent
commit
5fea00581b
  1. 5
      lib/sys.js

5
lib/sys.js

@ -25,7 +25,10 @@ var sysWarning;
if (!sysWarning) {
sysWarning = 'The "sys" module is now called "util". ' +
'It should have a similar interface.';
util.error(sysWarning);
if (process.env.NODE_DEBUG && process.env.NODE_DEBUG.indexOf('sys') != -1)
console.trace(sysWarning);
else
console.error(sysWarning);
}
exports.print = util.print;

Loading…
Cancel
Save