aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEduardo Habkost <ehabkost@redhat.com>2017-10-05 14:20:11 -0300
committerEduardo Habkost <ehabkost@redhat.com>2017-10-11 15:15:17 -0300
commit8af09b8001301e6bb085a23fc029da94e0725c1c (patch)
tree5b23f9b0cc3ff5313b042970c0f32bd2f456fb30
parentfb3b4e6d88120da41ae553853b281214f7aac7cf (diff)
guestperf: Configure logging on all shell frontends
The logging module will eventually replace the 'debug' parameter in QEMUMachine and QEMUMonitorProtocol. Cc: Daniel P. Berrange <berrange@redhat.com> Signed-off-by: Eduardo Habkost <ehabkost@redhat.com> Message-Id: <20171005172013.3098-2-ehabkost@redhat.com> Reviewed-by: Lukáš Doktor <ldoktor@redhat.com> Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
-rw-r--r--tests/migration/guestperf/shell.py13
1 files changed, 13 insertions, 0 deletions
diff --git a/tests/migration/guestperf/shell.py b/tests/migration/guestperf/shell.py
index 7992459a97..b272978f47 100644
--- a/tests/migration/guestperf/shell.py
+++ b/tests/migration/guestperf/shell.py
@@ -26,6 +26,7 @@ sys.path.append(os.path.join(os.path.dirname(__file__),
import argparse
import fnmatch
import platform
+import logging
from guestperf.hardware import Hardware
from guestperf.engine import Engine
@@ -147,6 +148,10 @@ class Shell(BaseShell):
def run(self, argv):
args = self._parser.parse_args(argv)
+ logging.basicConfig(level=(logging.DEBUG if args.debug else
+ logging.INFO if args.verbose else
+ logging.WARN))
+
engine = self.get_engine(args)
hardware = self.get_hardware(args)
@@ -179,6 +184,10 @@ class BatchShell(BaseShell):
def run(self, argv):
args = self._parser.parse_args(argv)
+ logging.basicConfig(level=(logging.DEBUG if args.debug else
+ logging.INFO if args.verbose else
+ logging.WARN))
+
engine = self.get_engine(args)
hardware = self.get_hardware(args)
@@ -231,6 +240,10 @@ class PlotShell(object):
def run(self, argv):
args = self._parser.parse_args(argv)
+ logging.basicConfig(level=(logging.DEBUG if args.debug else
+ logging.INFO if args.verbose else
+ logging.WARN))
+
if len(args.reports) == 0:
print >>sys.stderr, "At least one report required"