diff options
author | isaacs <i@izs.me> | 2013-05-21 15:22:05 -0700 |
---|---|---|
committer | isaacs <i@izs.me> | 2013-05-21 16:39:50 -0700 |
commit | 896b2aa7074fc886efd7dd0a397d694763cac7ce (patch) | |
tree | 10142a9e81afb77b762098b138caa50911e7a578 /lib/_http_common.js | |
parent | 0fefcc1690f65593aba768b78e1b97b925f8caad (diff) | |
download | nodejs-896b2aa7074fc886efd7dd0a397d694763cac7ce.tar.gz nodejs-896b2aa7074fc886efd7dd0a397d694763cac7ce.tar.bz2 nodejs-896b2aa7074fc886efd7dd0a397d694763cac7ce.zip |
util: Add debuglog, deprecate console lookalikes
Diffstat (limited to 'lib/_http_common.js')
-rw-r--r-- | lib/_http_common.js | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/lib/_http_common.js b/lib/_http_common.js index 8c9788627..1ed8abc8c 100644 --- a/lib/_http_common.js +++ b/lib/_http_common.js @@ -28,12 +28,7 @@ var readStart = incoming.readStart; var readStop = incoming.readStop; -var debug; -if (process.env.NODE_DEBUG && /http/.test(process.env.NODE_DEBUG)) { - debug = function(x) { console.error('HTTP: %s', x); }; -} else { - debug = function() { }; -} +var debug = require('util').debuglog('http'); exports.debug = debug; exports.CRLF = '\r\n'; |