[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PULL 1/5] iotests: Set up Python logging
From: |
Eduardo Habkost |
Subject: |
[Qemu-devel] [PULL 1/5] iotests: Set up Python logging |
Date: |
Wed, 11 Oct 2017 15:50:59 -0300 |
Set up Python logging module instead of relying on
QEMUMachine._debug to enable debugging messages.
Cc: Kevin Wolf <address@hidden>
Cc: Max Reitz <address@hidden>
Cc: address@hidden
Signed-off-by: Eduardo Habkost <address@hidden>
Message-Id: <address@hidden>
Reviewed-by: Daniel P. Berrange <address@hidden>
Reviewed-by: Lukáš Doktor <address@hidden>
Signed-off-by: Eduardo Habkost <address@hidden>
---
tests/qemu-iotests/iotests.py | 3 +++
1 file changed, 3 insertions(+)
diff --git a/tests/qemu-iotests/iotests.py b/tests/qemu-iotests/iotests.py
index 1af117e37d..36a7757aaf 100644
--- a/tests/qemu-iotests/iotests.py
+++ b/tests/qemu-iotests/iotests.py
@@ -28,6 +28,7 @@ import qtest
import struct
import json
import signal
+import logging
# This will not work if arguments contain spaces but is necessary if we
@@ -467,6 +468,8 @@ def main(supported_fmts=[], supported_oses=['linux']):
else:
output = StringIO.StringIO()
+ logging.basicConfig(level=(logging.DEBUG if debug else logging.WARN))
+
class MyTestRunner(unittest.TextTestRunner):
def __init__(self, stream=output, descriptions=True,
verbosity=verbosity):
unittest.TextTestRunner.__init__(self, stream, descriptions,
verbosity)
--
2.13.6
- [Qemu-devel] [PULL 0/5] Python queue, 2017-10-11, Eduardo Habkost, 2017/10/11
- [Qemu-devel] [PULL 1/5] iotests: Set up Python logging,
Eduardo Habkost <=
- [Qemu-devel] [PULL 2/5] basevm: Call logging.basicConfig(), Eduardo Habkost, 2017/10/11
- [Qemu-devel] [PULL 3/5] guestperf: Configure logging on all shell frontends, Eduardo Habkost, 2017/10/11
- [Qemu-devel] [PULL 4/5] scripts: Remove debug parameter from QEMUMonitorProtocol, Eduardo Habkost, 2017/10/11
- [Qemu-devel] [PULL 5/5] scripts: Remove debug parameter from QEMUMachine, Eduardo Habkost, 2017/10/11
- Re: [Qemu-devel] [PULL 0/5] Python queue, 2017-10-11, Peter Maydell, 2017/10/12