Skip to content
This repository has been archived by the owner on Apr 22, 2023. It is now read-only.

Commit

Permalink
sys: print stack trace if NODE_DEBUG=sys
Browse files Browse the repository at this point in the history
  • Loading branch information
bnoordhuis committed Nov 29, 2011
1 parent 6ed721a commit 5fea005
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion lib/sys.js
Expand Up @@ -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;
Expand Down

0 comments on commit 5fea005

Please sign in to comment.