diff options
-rw-r--r-- | tests/migration/guestperf/shell.py | 13 |
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" |