]> granicus.if.org Git - pdns/commitdiff
Add requestorId and deviceId to summary log
authorNeil Cook <neil.cook@noware.co.uk>
Thu, 24 Aug 2017 12:47:45 +0000 (13:47 +0100)
committerNeil Cook <neil.cook@noware.co.uk>
Thu, 24 Aug 2017 12:47:45 +0000 (13:47 +0100)
contrib/ProtobufLogger.py

index 5075e43f7d9f53adc3386359a8cc3185cc86bcd6..64a40248e2a6fe2400481c050c0316bc3d044cb1 100644 (file)
@@ -144,16 +144,20 @@ class PDNSPBConnHandler(object):
         if requestor:
             requestorstr = ' (' + requestor + ')'
 
-        print('[%s] %s of size %d: %s%s -> %s (%s), id: %d, uuid: %s%s' % (datestr,
-                                                                           typestr,
-                                                                           msg.inBytes,
-                                                                           ipfromstr,
-                                                                           requestorstr,
-                                                                           iptostr,
-                                                                           protostr,
-                                                                           msg.id,
-                                                                           messageidstr,
-                                                                           initialrequestidstr))
+        deviceId = binascii.hexlify(bytearray(msg.deviceId))
+        requestorId = msg.requestorId
+
+        print('[%s] %s of size %d: %s%s -> %s (%s), id: %d, uuid: %s%s '
+                  'requestorid: %s deviceid: %s' % (datestr,
+                                                    typestr,
+                                                    msg.inBytes,
+                                                    ipfromstr,
+                                                    requestorstr,
+                                                    iptostr,
+                                                    protostr,
+                                                    msg.id,
+                                                    messageidstr,
+                                                    initialrequestidstr))
 
     def getRequestorSubnet(self, msg):
         requestorstr = None