From d53407ddf0c43bdc79f15a8fe67333090613f90a Mon Sep 17 00:00:00 2001 From: Kristian Hunt Date: Wed, 16 Sep 2015 10:34:33 +0200 Subject: Remove setting logger level to debug in scenarios Logging level should be specified using a command line flag -v or -d when running yardstick, rather than hardcoded into source code. If the message is to be displayed whenever yardstick is executed regardless of the verbosity level, then the message should be logged to warning or error levels, instead of debug. JIRA: YARDSTICK-95 Change-Id: Idc9b81b583f4999bfbc57893f0ab3c3675c70f71 Signed-off-by: Kristian Hunt --- yardstick/benchmark/scenarios/compute/lmbench.py | 3 +-- yardstick/benchmark/scenarios/compute/perf.py | 3 +-- yardstick/benchmark/scenarios/networking/iperf3.py | 5 ++--- yardstick/benchmark/scenarios/networking/ping.py | 2 +- yardstick/benchmark/scenarios/networking/pktgen.py | 5 ++--- yardstick/benchmark/scenarios/storage/fio.py | 3 +-- 6 files changed, 8 insertions(+), 13 deletions(-) diff --git a/yardstick/benchmark/scenarios/compute/lmbench.py b/yardstick/benchmark/scenarios/compute/lmbench.py index 4ce2825c7..367739128 100644 --- a/yardstick/benchmark/scenarios/compute/lmbench.py +++ b/yardstick/benchmark/scenarios/compute/lmbench.py @@ -14,7 +14,6 @@ import yardstick.ssh as ssh from yardstick.benchmark.scenarios import base LOG = logging.getLogger(__name__) -LOG.setLevel(logging.DEBUG) class Lmbench(base.Scenario): @@ -49,7 +48,7 @@ class Lmbench(base.Scenario): host = self.context.get("host", None) key_filename = self.context.get('key_filename', "~/.ssh/id_rsa") - LOG.debug("user:%s, host:%s", user, host) + LOG.info("user:%s, host:%s", user, host) self.client = ssh.SSH(user, host, key_filename=key_filename) self.client.wait(timeout=600) diff --git a/yardstick/benchmark/scenarios/compute/perf.py b/yardstick/benchmark/scenarios/compute/perf.py index 62b4297e3..a874ea94c 100644 --- a/yardstick/benchmark/scenarios/compute/perf.py +++ b/yardstick/benchmark/scenarios/compute/perf.py @@ -14,7 +14,6 @@ import yardstick.ssh as ssh from yardstick.benchmark.scenarios import base LOG = logging.getLogger(__name__) -LOG.setLevel(logging.DEBUG) class Perf(base.Scenario): @@ -49,7 +48,7 @@ class Perf(base.Scenario): host = self.context.get('host', None) key_filename = self.context.get('key_filename', '~/.ssh/id_rsa') - LOG.debug("user:%s, host:%s", user, host) + LOG.info("user:%s, host:%s", user, host) self.client = ssh.SSH(user, host, key_filename=key_filename) self.client.wait(timeout=600) diff --git a/yardstick/benchmark/scenarios/networking/iperf3.py b/yardstick/benchmark/scenarios/networking/iperf3.py index 3c4cd1fbf..ff625de4d 100644 --- a/yardstick/benchmark/scenarios/networking/iperf3.py +++ b/yardstick/benchmark/scenarios/networking/iperf3.py @@ -18,7 +18,6 @@ import yardstick.ssh as ssh from yardstick.benchmark.scenarios import base LOG = logging.getLogger(__name__) -LOG.setLevel(logging.DEBUG) class Iperf(base.Scenario): @@ -59,12 +58,12 @@ For more info see http://software.es.net/iperf def setup(self): LOG.debug("setup, key %s", self.key_filename) - LOG.debug("host:%s, user:%s", self.host_ipaddr, self.user) + LOG.info("host:%s, user:%s", self.host_ipaddr, self.user) self.host = ssh.SSH(self.user, self.host_ipaddr, key_filename=self.key_filename) self.host.wait(timeout=600) - LOG.debug("target:%s, user:%s", self.target_ipaddr, self.user) + LOG.info("target:%s, user:%s", self.target_ipaddr, self.user) self.target = ssh.SSH(self.user, self.target_ipaddr, key_filename=self.key_filename) self.target.wait(timeout=600) diff --git a/yardstick/benchmark/scenarios/networking/ping.py b/yardstick/benchmark/scenarios/networking/ping.py index 630b007c2..41395d8d6 100644 --- a/yardstick/benchmark/scenarios/networking/ping.py +++ b/yardstick/benchmark/scenarios/networking/ping.py @@ -40,7 +40,7 @@ class Ping(base.Scenario): host = self.context.get('host', None) key_filename = self.context.get('key_filename', '~/.ssh/id_rsa') - LOG.debug("user:%s, host:%s", user, host) + LOG.info("user:%s, host:%s", user, host) self.connection = ssh.SSH(user, host, key_filename=key_filename) self.connection.wait() diff --git a/yardstick/benchmark/scenarios/networking/pktgen.py b/yardstick/benchmark/scenarios/networking/pktgen.py index e6d6893c9..cc28b514a 100644 --- a/yardstick/benchmark/scenarios/networking/pktgen.py +++ b/yardstick/benchmark/scenarios/networking/pktgen.py @@ -14,7 +14,6 @@ import yardstick.ssh as ssh from yardstick.benchmark.scenarios import base LOG = logging.getLogger(__name__) -LOG.setLevel(logging.DEBUG) class Pktgen(base.Scenario): @@ -52,11 +51,11 @@ class Pktgen(base.Scenario): target = self.context.get('target', None) key_filename = self.context.get('key_filename', '~/.ssh/id_rsa') - LOG.debug("user:%s, target:%s", user, target) + LOG.info("user:%s, target:%s", user, target) self.server = ssh.SSH(user, target, key_filename=key_filename) self.server.wait(timeout=600) - LOG.debug("user:%s, host:%s", user, host) + LOG.info("user:%s, host:%s", user, host) self.client = ssh.SSH(user, host, key_filename=key_filename) self.client.wait(timeout=600) diff --git a/yardstick/benchmark/scenarios/storage/fio.py b/yardstick/benchmark/scenarios/storage/fio.py index 4eaf8796a..d3695165f 100644 --- a/yardstick/benchmark/scenarios/storage/fio.py +++ b/yardstick/benchmark/scenarios/storage/fio.py @@ -14,7 +14,6 @@ import yardstick.ssh as ssh from yardstick.benchmark.scenarios import base LOG = logging.getLogger(__name__) -LOG.setLevel(logging.DEBUG) class Fio(base.Scenario): @@ -62,7 +61,7 @@ class Fio(base.Scenario): host = self.context.get("host", None) key_filename = self.context.get("key_filename", "~/.ssh/id_rsa") - LOG.debug("user:%s, host:%s", user, host) + LOG.info("user:%s, host:%s", user, host) self.client = ssh.SSH(user, host, key_filename=key_filename) self.client.wait(timeout=600) -- cgit 1.2.3-korg