Skip to content

Commit

Permalink
guestperf: Configure logging on all shell frontends
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
ehabkost committed Oct 11, 2017
1 parent fb3b4e6 commit 8af09b8
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions tests/migration/guestperf/shell.py
Expand Up @@ -26,6 +26,7 @@
import argparse
import fnmatch
import platform
import logging

from guestperf.hardware import Hardware
from guestperf.engine import Engine
Expand Down Expand Up @@ -147,6 +148,10 @@ def get_scenario(self, args):

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)
Expand Down Expand Up @@ -179,6 +184,10 @@ def __init__(self):

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)
Expand Down Expand Up @@ -231,6 +240,10 @@ def __init__(self):

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"
Expand Down

0 comments on commit 8af09b8

Please sign in to comment.