Remove setting logger level to debug in scenarios 19/1619/1
authorKristian Hunt <kristian.hunt@gmail.com>
Wed, 16 Sep 2015 08:34:33 +0000 (10:34 +0200)
committerKristian Hunt <kristian.hunt@gmail.com>
Wed, 16 Sep 2015 09:08:24 +0000 (11:08 +0200)
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 <kristian.hunt@gmail.com>
yardstick/benchmark/scenarios/compute/lmbench.py
yardstick/benchmark/scenarios/compute/perf.py
yardstick/benchmark/scenarios/networking/iperf3.py
yardstick/benchmark/scenarios/networking/ping.py
yardstick/benchmark/scenarios/networking/pktgen.py
yardstick/benchmark/scenarios/storage/fio.py

index 4ce2825..3677391 100644 (file)
@@ -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)
 
index 62b4297..a874ea9 100644 (file)
@@ -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)
 
index 3c4cd1f..ff625de 100644 (file)
@@ -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)
index 630b007..41395d8 100644 (file)
@@ -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()
index e6d6893..cc28b51 100644 (file)
@@ -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)
 
index 4eaf879..d369516 100644 (file)
@@ -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)