qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [RFC v1 0/3] Implement a warning_report function


From: Alistair Francis
Subject: Re: [Qemu-devel] [RFC v1 0/3] Implement a warning_report function
Date: Wed, 28 Jun 2017 08:49:43 -0700

On Wed, Jun 28, 2017 at 2:07 AM, Daniel P. Berrange <address@hidden> wrote:
> On Tue, Jun 27, 2017 at 01:45:41PM -0700, Alistair Francis wrote:
>> QEMU currently has a standard method to report errors with
>> error_repot(). This ensure a sane and standard format when printing
>> errors. This series is attempting to add the same functionality for
>> warnings.
>
> I'm not seeing the obvious benefit in this change. Despite its name
> 'error_report' is ultimately just a clever way to run printf()
> on a text string. It can be used for errors, warnings, information
> alike. If anything the current method is simply misnamed, and could
> be changed to 'message_report'.

I agree that this new method results in the same information being
printed to the same place as error_report(). What I am trying to
achieve though is a consistent structure for messages. So that every
error, warning and information message that QEMU prints looks the same
and are all obvious. The final end goal is that when including QEMU in
other systems (like an Eclipse GUI) all of the different messages can
be clearly understood and automatically parsed.

The problem I think we have now is that some messages just showing
information to the user (like in patch 3) are treated the same as
errors, when they really are not errors. I have seen a lot of
confusion caused by QEMU printing errors and information to stderr
with no obvious way to differentiate which is which.

Thanks,
Alistair

>
> Regards,
> Daniel
> --
> |: https://berrange.com      -o-    https://www.flickr.com/photos/dberrange :|
> |: https://libvirt.org         -o-            https://fstop138.berrange.com :|
> |: https://entangle-photo.org    -o-    https://www.instagram.com/dberrange :|



reply via email to

[Prev in Thread] Current Thread [Next in Thread]