Skip to content

Commit 159bc80

Browse files
author
Ruben Bridgewater
committed
Revert to old behavior
1 parent 03e696b commit 159bc80

File tree

1 file changed

+7
-10
lines changed

1 file changed

+7
-10
lines changed

index.js

Lines changed: 7 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -13,16 +13,13 @@ var net = require("net"),
1313
connection_id = 0,
1414
default_port = 6379,
1515
default_host = "127.0.0.1",
16-
debug;
17-
18-
/* istanbul ignore next */
19-
if (util.debuglog) {
20-
debug = util.debuglog('redis');
21-
} else if (/\bredis\b/i.test(process.env.NODE_DEBUG)) {
22-
debug = console.error;
23-
} else {
24-
debug = function() {};
25-
}
16+
debug = function(msg) {
17+
if (exports.debug_mode) {
18+
console.error(msg);
19+
}
20+
};
21+
22+
exports.debug_mode = /\bredis\b/i.test(process.env.NODE_DEBUG);
2623

2724
// hiredis might not be installed
2825
try {

0 commit comments

Comments
 (0)