From: "Lukáš Doktor" <ldoktor@redhat.com>
To: Eduardo Habkost <ehabkost@redhat.com>, qemu-devel@nongnu.org
Cc: Cleber Rosa <crosa@redhat.com>, Kevin Wolf <kwolf@redhat.com>,
Max Reitz <mreitz@redhat.com>,
qemu-block@nongnu.org
Subject: Re: [Qemu-devel] [PATCH 2/5] iotests: Set up Python logging
Date: Thu, 28 Sep 2017 10:54:56 +0200 [thread overview]
Message-ID: <828133ca-fbb0-e9cf-fca8-65a59ff9ba90@redhat.com> (raw)
In-Reply-To: <20170927130339.21444-3-ehabkost@redhat.com>
[-- Attachment #1: Type: text/plain, Size: 1508 bytes --]
Dne 27.9.2017 v 15:03 Eduardo Habkost napsal(a):
> Set up Python logging module instead of relying on
> QEMUMachine._debug to enable debugging messages.
>
> Cc: Kevin Wolf <kwolf@redhat.com>
> Cc: Max Reitz <mreitz@redhat.com>
> Cc: qemu-block@nongnu.org
> Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
> ---
> 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))
> +
Strictly speaking the brackets around ternary operator are not necessary, but given this is not a python project it's probably fine.
> class MyTestRunner(unittest.TextTestRunner):
> def __init__(self, stream=output, descriptions=True, verbosity=verbosity):
> unittest.TextTestRunner.__init__(self, stream, descriptions, verbosity)
>
Yes, this is a better solution than the previous logging hotfix.
Reviewed-by: Lukáš Doktor <ldoktor@redhat.com>
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 502 bytes --]
next prev parent reply other threads:[~2017-09-28 8:55 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-09-27 13:03 [Qemu-devel] [PATCH 0/5] scripts: Remove 'debug' parameter from QEMUMachine & QEMUMonitorProtocol Eduardo Habkost
2017-09-27 13:03 ` [Qemu-devel] [PATCH 1/5] guestperf: Configure logging on all shell frontends Eduardo Habkost
2017-09-27 13:17 ` Daniel P. Berrange
2017-09-28 9:15 ` Lukáš Doktor
2017-09-28 13:19 ` Eduardo Habkost
2017-09-27 13:03 ` [Qemu-devel] [PATCH 2/5] iotests: Set up Python logging Eduardo Habkost
2017-09-27 13:17 ` Daniel P. Berrange
2017-09-28 8:54 ` Lukáš Doktor [this message]
2017-09-27 13:03 ` [Qemu-devel] [PATCH 3/5] basevm: Call logging.basicConfig() Eduardo Habkost
2017-09-27 13:19 ` Daniel P. Berrange
2017-09-27 13:35 ` Fam Zheng
2017-09-27 13:40 ` Eduardo Habkost
2017-09-28 9:24 ` Lukáš Doktor
2017-09-27 13:03 ` [Qemu-devel] [PATCH 4/5] scripts: Remove debug parameter from QEMUMonitorProtocol Eduardo Habkost
2017-09-27 13:20 ` Daniel P. Berrange
2017-09-27 13:33 ` Fam Zheng
2017-09-27 13:41 ` Eduardo Habkost
2017-09-27 13:44 ` [Qemu-devel] [PATCH] fixup! " Eduardo Habkost
2017-09-28 9:33 ` Lukáš Doktor
2017-09-28 14:01 ` Eduardo Habkost
2017-09-27 13:03 ` [Qemu-devel] [PATCH 5/5] scripts: Remove debug parameter from QEMUMachine Eduardo Habkost
2017-09-27 13:22 ` Daniel P. Berrange
2017-09-27 13:38 ` Eduardo Habkost
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=828133ca-fbb0-e9cf-fca8-65a59ff9ba90@redhat.com \
--to=ldoktor@redhat.com \
--cc=crosa@redhat.com \
--cc=ehabkost@redhat.com \
--cc=kwolf@redhat.com \
--cc=mreitz@redhat.com \
--cc=qemu-block@nongnu.org \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).