[dts] [PATCH v1 2/2] framework/packet: log scapy command for later debug

Marvin Liu yong.liu at intel.com
Thu Jan 25 08:10:29 CET 2018


Signed-off-by: Marvin Liu <yong.liu at intel.com>

diff --git a/framework/packet.py b/framework/packet.py
index 2aa2188..208c9a2 100755
--- a/framework/packet.py
+++ b/framework/packet.py
@@ -73,6 +73,10 @@ from nvgre import NVGRE, IPPROTO_NVGRE
 from lldp import LLDP, LLDPManagementAddress
 from Dot1BR import Dot1BR
 
+# get tester logger
+from logger import getLogger
+logger = getLogger('tester')
+
 # packet generator type should be configured later
 PACKETGEN = "scapy"
 
@@ -351,7 +355,7 @@ class scapy(object):
         crb.send_expect("scapy -c scapy_%s.cmd &" % intf, "# ")
 
     def print_summary(self):
-        print "Send out pkt %s" % self.pkt.summary()
+        logger.info("%s" % self.pkt.command())
 
     def send_pkt(self, intf='', count=1):
         self.print_summary()
-- 
1.9.3



More information about the dts mailing list