Permalink
Browse files

sys: print stack trace if NODE_DEBUG=sys

  • Loading branch information...
1 parent 6ed721a commit 5fea00581b8bdc04256ede380cac0fd0da97489c @bnoordhuis bnoordhuis committed Nov 29, 2011
Showing with 4 additions and 1 deletion.
  1. +4 −1 lib/sys.js
View
@@ -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;

0 comments on commit 5fea005

Please sign in to comment.