From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 5B627A0613 for ; Mon, 23 Sep 2019 08:49:19 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 177961BEC3; Mon, 23 Sep 2019 08:49:13 +0200 (CEST) Received: from mga07.intel.com (mga07.intel.com [134.134.136.100]) by dpdk.org (Postfix) with ESMTP id DA9EA1BE82 for ; Mon, 23 Sep 2019 08:49:09 +0200 (CEST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by orsmga105.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 22 Sep 2019 23:49:09 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.64,539,1559545200"; d="scan'208";a="388384356" Received: from dpdk-moyufen06.sh.intel.com ([10.67.116.222]) by fmsmga005.fm.intel.com with ESMTP; 22 Sep 2019 23:49:08 -0700 From: yufengmx To: dts@dpdk.org, wenjiex.a.li@intel.com, zhaoyan.chen@intel.com, lijuan.tu@intel.com Cc: yufengmx Date: Mon, 23 Sep 2019 14:50:37 +0800 Message-Id: <20190923065040.8251-5-yufengx.mo@intel.com> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20190923065040.8251-1-yufengx.mo@intel.com> References: <20190923065040.8251-1-yufengx.mo@intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [dts] [PATCH V2 4/7] framework/pktgen_base: fix internal bug X-BeenThere: dts@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: test suite reviews and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dts-bounces@dpdk.org Sender: "dts" *. 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 --- 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