Skip to content

Commit 1eb30ad

Browse files
author
Ruben Bridgewater
committed
Use util.debuglog instead of using different indidivudal styles for debugging
1 parent 954f1f3 commit 1eb30ad

File tree

10 files changed

+52
-161
lines changed

10 files changed

+52
-161
lines changed

README.md

Lines changed: 0 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -539,36 +539,6 @@ This will print:
539539

540540
Note that this program will not exit cleanly because the client is still connected.
541541

542-
## redis.debug_mode
543-
544-
Boolean to enable debug mode and protocol tracing.
545-
546-
```js
547-
var redis = require("redis"),
548-
client = redis.createClient();
549-
550-
redis.debug_mode = true;
551-
552-
client.on("connect", function () {
553-
client.set("foo_rand000000000000", "some fantastic value");
554-
});
555-
```
556-
557-
This will display:
558-
559-
mjr:~/work/node_redis (master)$ node ~/example.js
560-
send command: *3
561-
$3
562-
SET
563-
$20
564-
foo_rand000000000000
565-
$20
566-
some fantastic value
567-
568-
on_data: +OK
569-
570-
`send command` is data sent into Redis and `on_data` is data received from Redis.
571-
572542
## Multi-word commands
573543

574544
To execute redis multi-word commands like `SCRIPT LOAD` or `CLIENT LIST` pass

examples/eval.js

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,6 @@
33
var redis = require("../index"),
44
client = redis.createClient();
55

6-
redis.debug_mode = true;
7-
86
client.eval("return 100.5", 0, function (err, res) {
97
console.dir(err);
108
console.dir(res);

examples/psubscribe.js

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,6 @@ var redis = require("redis"),
77
client4 = redis.createClient(),
88
msg_count = 0;
99

10-
redis.debug_mode = false;
11-
1210
client1.on("psubscribe", function (pattern, count) {
1311
console.log("client1 psubscribed to " + pattern + ", " + count + " total subscriptions");
1412
client2.publish("channeltwo", "Me!");

examples/pub_sub.js

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,6 @@ var redis = require("redis"),
44
client1 = redis.createClient(), msg_count = 0,
55
client2 = redis.createClient();
66

7-
redis.debug_mode = false;
8-
97
// Most clients probably don't do much on "subscribe". This example uses it to coordinate things within one program.
108
client1.on("subscribe", function (channel, count) {
119
console.log("client1 subscribed to " + channel + ", " + count + " total subscriptions");

0 commit comments

Comments
 (0)