From: yufengmx <yufengx.mo@intel.com>
To: dts@dpdk.org, wenjiex.a.li@intel.com, zhaoyan.chen@intel.com,
lijuan.tu@intel.com
Cc: yufengmx <yufengx.mo@intel.com>
Subject: [dts] [PATCH V2 4/7] framework/pktgen_base: fix internal bug
Date: Mon, 23 Sep 2019 14:50:37 +0800 [thread overview]
Message-ID: <20190923065040.8251-5-yufengx.mo@intel.com> (raw)
In-Reply-To: <20190923065040.8251-1-yufengx.mo@intel.com>
*. remove logger format setting after import libs to eliminate dts redundant logs.
*. set part of information logger display to debug level.
*. remove un-used libs import.
Signed-off-by: yufengmx <yufengx.mo@intel.com>
---
framework/pktgen_base.py | 12 ++----------
1 file changed, 2 insertions(+), 10 deletions(-)
diff --git a/framework/pktgen_base.py b/framework/pktgen_base.py
index 4cb5447..cd541b0 100644
--- a/framework/pktgen_base.py
+++ b/framework/pktgen_base.py
@@ -29,7 +29,6 @@
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-import os
import time
import logging
from abc import abstractmethod
@@ -45,11 +44,6 @@ from settings import PKTGEN_DPDK, PKTGEN_TREX, PKTGEN_IXIA, PKTGEN
TRANSMIT_CONT = 'continuous'
TRANSMIT_M_BURST = 'multi_burst'
TRANSMIT_S_BURST = 'single_burst'
-# set logger
-FORMAT = '%(message)s'
-logging.basicConfig(format=FORMAT)
-logger = logging.getLogger(os.path.basename(__file__)[:-3].upper())
-logger.setLevel(logging.INFO)
class PacketGenerator(object):
@@ -83,7 +77,7 @@ class PacketGenerator(object):
if tester_pci == gen_pci:
msg = "gen port {0} map test port {1}".format(
port_id, port_idx)
- self.logger.info(msg)
+ self.logger.debug(msg)
return port_idx
else:
port = -1
@@ -105,7 +99,7 @@ class PacketGenerator(object):
tester_pci = info['pci']
port = self._get_gen_port(tester_pci)
msg = "test port {0} map gen port {1}".format(port_id, port)
- self.logger.info(msg)
+ self.logger.debug(msg)
except:
port = -1
@@ -349,8 +343,6 @@ class PacketGenerator(object):
else:
result = None
- self.logger.info(result)
-
return result
def _summary_statistic(self, array=[]):
--
2.21.0
next prev parent reply other threads:[~2019-09-23 6:49 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-09-23 6:50 [dts] [PATCH V2 0/7] dts/pktgen: fix internal bugs yufengmx
2019-09-23 6:50 ` [dts] [PATCH V2 1/7] framework/logger: add pktgen logger and remove duplicate yufengmx
2019-09-23 6:58 ` Mo, YufengX
2019-09-23 6:50 ` [dts] [PATCH V2 2/7] framework/dut: fix logger quit issue yufengmx
2019-09-23 6:58 ` Mo, YufengX
2019-09-23 6:50 ` [dts] [PATCH V2 3/7] framework/tester: " yufengmx
2019-09-23 6:58 ` Mo, YufengX
2019-09-23 6:50 ` yufengmx [this message]
2019-09-23 6:58 ` [dts] [PATCH V2 4/7] framework/pktgen_base: fix internal bug Mo, YufengX
2019-09-23 6:50 ` [dts] [PATCH V2 5/7] framework/pktgen_ixia: " yufengmx
2019-09-23 6:57 ` Mo, YufengX
2019-09-23 6:50 ` [dts] [PATCH V2 6/7] framework/pktgen_trex: " yufengmx
2019-09-23 6:57 ` Mo, YufengX
2019-09-23 6:50 ` [dts] [PATCH V2 7/7] framework/pktgen: " yufengmx
2019-09-23 6:57 ` Mo, YufengX
2019-09-23 6:58 ` [dts] [PATCH V2 0/7] dts/pktgen: fix internal bugs Mo, YufengX
2019-09-24 9:14 ` Tu, Lijuan
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=20190923065040.8251-5-yufengx.mo@intel.com \
--to=yufengx.mo@intel.com \
--cc=dts@dpdk.org \
--cc=lijuan.tu@intel.com \
--cc=wenjiex.a.li@intel.com \
--cc=zhaoyan.chen@intel.com \
/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).