test suite reviews and discussions
 help / color / mirror / Atom feed
From: Marvin Liu <yong.liu@intel.com>
To: dts@dpdk.org
Cc: Marvin Liu <yong.liu@intel.com>
Subject: [dts] [PATCH v1 2/2] framework/packet: log scapy command for later debug
Date: Thu, 25 Jan 2018 02:10:29 -0500	[thread overview]
Message-ID: <1516864229-6034-2-git-send-email-yong.liu@intel.com> (raw)
In-Reply-To: <1516864229-6034-1-git-send-email-yong.liu@intel.com>

Signed-off-by: Marvin Liu <yong.liu@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

      reply	other threads:[~2018-01-25 14:17 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-01-25  7:10 [dts] [PATCH v1 1/2] framework/logger: getLogger will return existing logger Marvin Liu
2018-01-25  7:10 ` Marvin Liu [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1516864229-6034-2-git-send-email-yong.liu@intel.com \
    --to=yong.liu@intel.com \
    --cc=dts@dpdk.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).