From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from tama50.ecl.ntt.co.jp (tama50.ecl.ntt.co.jp [129.60.39.147]) by dpdk.org (Postfix) with ESMTP id 663691B192 for ; Mon, 4 Feb 2019 04:13:30 +0100 (CET) Received: from vc2.ecl.ntt.co.jp (vc2.ecl.ntt.co.jp [129.60.86.154]) by tama50.ecl.ntt.co.jp (8.13.8/8.13.8) with ESMTP id x143DTLJ030584; Mon, 4 Feb 2019 12:13:29 +0900 Received: from vc2.ecl.ntt.co.jp (localhost [127.0.0.1]) by vc2.ecl.ntt.co.jp (Postfix) with ESMTP id EF612638AAE; Mon, 4 Feb 2019 12:13:28 +0900 (JST) Received: from localhost.localdomain (lobster.nslab.ecl.ntt.co.jp [129.60.13.95]) by vc2.ecl.ntt.co.jp (Postfix) with ESMTP id DFF82638A8D; Mon, 4 Feb 2019 12:13:28 +0900 (JST) From: ogawa.yasufumi@lab.ntt.co.jp To: spp@dpdk.org, ferruh.yigit@intel.com, ogawa.yasufumi@lab.ntt.co.jp Date: Mon, 4 Feb 2019 12:11:19 +0900 Message-Id: <1549249879-31580-6-git-send-email-ogawa.yasufumi@lab.ntt.co.jp> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1549249879-31580-1-git-send-email-ogawa.yasufumi@lab.ntt.co.jp> References: <1549249879-31580-1-git-send-email-ogawa.yasufumi@lab.ntt.co.jp> X-TM-AS-MML: disable Subject: [spp] [PATCH 5/5] controller: refactor configuration of logfile X-BeenThere: spp@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: Soft Patch Panel List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 04 Feb 2019 03:13:31 -0000 From: Yasufumi Ogawa Make the name of logfile explicitly in `spp_common.py`. Signed-off-by: Yasufumi Ogawa --- src/controller/commands/pri.py | 2 ++ src/controller/spp_common.py | 4 +++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/src/controller/commands/pri.py b/src/controller/commands/pri.py index bb89a5f..b9f1234 100644 --- a/src/controller/commands/pri.py +++ b/src/controller/commands/pri.py @@ -331,6 +331,8 @@ class SppPrimary(object): else: opts['app']['--client-id'] = sec_id + logger.debug('launch, {}'.format(opts)) + # Send request for launch secondary. res = self.spp_ctl_cli.put('primary/launch', opts) if res is not None: diff --git a/src/controller/spp_common.py b/src/controller/spp_common.py index c94d175..6d0546e 100644 --- a/src/controller/spp_common.py +++ b/src/controller/spp_common.py @@ -9,6 +9,8 @@ PORT_TYPES = ['phy', 'ring', 'vhost', 'pcap', 'nullpmd'] SEC_TYPES = ['nfv', 'vf', 'mirror', 'pcap'] +LOGFILE = 'spp_cli.log' # name of logfile under `/src/controller/log/` + cur_server_addr = None # Maximum num of sock queues for secondaries @@ -19,7 +21,7 @@ logger = logging.getLogger(__name__) # handler = logging.StreamHandler() os.system("mkdir -p %s/log" % (os.path.dirname(__file__))) -logfile = '%s/log/%s' % (os.path.dirname(__file__), 'spp.log') +logfile = '%s/log/%s' % (os.path.dirname(__file__), LOGFILE) handler = logging.FileHandler(logfile) handler.setLevel(logging.DEBUG) formatter = logging.Formatter( -- 2.7.4