mirror of
https://github.com/nodejs/node.git
synced 2025-08-15 13:48:44 +02:00
sys: print stack trace if NODE_DEBUG=sys
This commit is contained in:
parent
6ed721afd2
commit
5fea00581b
1 changed files with 4 additions and 1 deletions
|
@ -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…
Add table
Add a link
Reference in a new issue