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 748CAA04AF; Thu, 20 Aug 2020 09:38:30 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 335311BEC3; Thu, 20 Aug 2020 09:38:30 +0200 (CEST) Received: from mga17.intel.com (mga17.intel.com [192.55.52.151]) by dpdk.org (Postfix) with ESMTP id 9692F1BEBA for ; Thu, 20 Aug 2020 09:38:28 +0200 (CEST) IronPort-SDR: P3fq3GM6xLC2KdviA6aN3iPcICn5PozJhEgc/9405ynmwQyju+UGhLT9paAQSirXSYvdApg5bu aGCZqBUN235w== X-IronPort-AV: E=McAfee;i="6000,8403,9718"; a="135320576" X-IronPort-AV: E=Sophos;i="5.76,332,1592895600"; d="scan'208";a="135320576" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by fmsmga107.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 20 Aug 2020 00:38:27 -0700 IronPort-SDR: 6KK80imUDiCYrszmZh2JHF6X7scir8vHBMmbg9GsIjuw9dJs9ED4Qj6soz1ENSRdQ+YEnJMMUn tBvcb0pv0EEA== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.76,332,1592895600"; d="scan'208";a="401069100" Received: from unknown (HELO localhost.localdomain) ([10.240.183.52]) by fmsmga001.fm.intel.com with ESMTP; 20 Aug 2020 00:38:26 -0700 From: Xiao Qimai To: dts@dpdk.org Cc: Xiao Qimai Date: Thu, 20 Aug 2020 07:15:48 +0000 Message-Id: <20200820071548.89512-1-qimaix.xiao@intel.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [dts] [PATCH V1] fix enable verbose dts log duplicate info in file and console 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" *. debug level is lower than info, when enable dts verbose, both info and debug message will be print and logged twice Signed-off-by: Xiao Qimai --- framework/ssh_connection.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/framework/ssh_connection.py b/framework/ssh_connection.py index afeef1c..e096a9e 100644 --- a/framework/ssh_connection.py +++ b/framework/ssh_connection.py @@ -62,7 +62,7 @@ class SSHConnection(object): def send_expect(self, cmds, expected, timeout=15, verify=False): self.logger.info(cmds) out = self.session.send_expect(cmds, expected, timeout, verify) - self.logger.debug(out) + self.logger.debug(out.replace(cmds, '')) if type(self.history) is list: self.history.append({"command": cmds, "name": self.name, "output": out}) return out @@ -70,7 +70,7 @@ class SSHConnection(object): def send_command(self, cmds, timeout=1): self.logger.info(cmds) out = self.session.send_command(cmds, timeout) - self.logger.debug(out) + self.logger.debug(out.replace(cmds, '')) if type(self.history) is list: self.history.append({"command": cmds, "name": self.name, "output": out}) return out -- 2.25.1