We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 4f79370 + 159bc80 commit 4a8da6dCopy full SHA for 4a8da6d
index.js
@@ -14,16 +14,13 @@ var net = require("net"),
14
connection_id = 0,
15
default_port = 6379,
16
default_host = "127.0.0.1",
17
- debug;
18
-
19
-/* istanbul ignore next */
20
-if (util.debuglog) {
21
- debug = util.debuglog('redis');
22
-} else if (/\bredis\b/i.test(process.env.NODE_DEBUG)) {
23
- debug = console.error;
24
-} else {
25
- debug = function() {};
26
-}
+ debug = function(msg) {
+ if (exports.debug_mode) {
+ console.error(msg);
+ }
+ };
+
+exports.debug_mode = /\bredis\b/i.test(process.env.NODE_DEBUG);
27
28
// hiredis might not be installed
29
try {
0 commit comments