File tree Expand file tree Collapse file tree 1 file changed +4
-1
lines changed Expand file tree Collapse file tree 1 file changed +4
-1
lines changed Original file line number Diff line number Diff line change @@ -17,6 +17,8 @@ mqtt.createServer(function(client) {
17
17
client . on ( 'subscribe' , function ( packet ) {
18
18
var granted = [ ] ;
19
19
20
+ console . log ( "SUBSCRIBE(%s): %j" , client . id , packet ) ;
21
+
20
22
for ( var i = 0 ; i < packet . subscriptions . length ; i ++ ) {
21
23
var qos = packet . subscriptions [ i ] . qos
22
24
, topic = packet . subscriptions [ i ] . topic
@@ -30,6 +32,7 @@ mqtt.createServer(function(client) {
30
32
} ) ;
31
33
32
34
client . on ( 'publish' , function ( packet ) {
35
+ console . log ( "PUBLISH(%s): %j" , client . id , packet ) ;
33
36
for ( var k in self . clients ) {
34
37
var c = self . clients [ k ]
35
38
, publish = false ;
@@ -49,7 +52,7 @@ mqtt.createServer(function(client) {
49
52
} ) ;
50
53
51
54
client . on ( 'pingreq' , function ( packet ) {
52
- console . log ( 'Ping from client ' + client . id ) ;
55
+ console . log ( 'PINGREQ(%s)' , client . id ) ;
53
56
client . pingresp ( ) ;
54
57
} ) ;
55
58
You can’t perform that action at this time.
0 commit comments