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

Commit

Permalink
Revert "util: always display a warning for module in debug mode"
Browse files Browse the repository at this point in the history
This reverts commit df62005.
  • Loading branch information
indutny committed Jan 16, 2012
1 parent df62005 commit 03e689f
Showing 1 changed file with 9 additions and 10 deletions.
19 changes: 9 additions & 10 deletions lib/util.js
Expand Up @@ -522,16 +522,15 @@ exports.inherits = function(ctor, superCtor) {
var deprecationWarnings;

exports._deprecationWarning = function(moduleId, message) {
if ((new RegExp('\\b' + moduleId + '\\b')).test(process.env.NODE_DEBUG)) {
if (!deprecationWarnings)
deprecationWarnings = {};
else if (message in deprecationWarnings)
return;

deprecationWarnings[message] = true;

if ((new RegExp('\\b' + moduleId + '\\b')).test(process.env.NODE_DEBUG))
console.trace(message);
} else {
if (!deprecationWarnings) {
deprecationWarnings = {};
} else if (message in deprecationWarnings) {
return;
}
else
console.error(message);

deprecationWarnings[message] = true;
}
};

0 comments on commit 03e689f

Please sign in to comment.