mirror of
https://github.com/xemu-project/xemu.git
synced 2024-11-25 04:30:02 +00:00
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>
This commit is contained in:
parent
fb3b4e6d88
commit
8af09b8001
@ -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"
|
||||
|
Loading…
Reference in New Issue
Block a user