qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Alistair Francis <alistair.francis@xilinx.com>
To: Markus Armbruster <armbru@redhat.com>
Cc: "Alistair Francis" <alistair.francis@xilinx.com>,
	"Paolo Bonzini" <pbonzini@redhat.com>,
	"Gerd Hoffmann" <kraxel@redhat.com>,
	"Marc-André Lureau" <marcandre.lureau@gmail.com>,
	"qemu-devel@nongnu.org Developers" <qemu-devel@nongnu.org>,
	"Philippe Mathieu-Daudé" <f4bug@amsat.org>
Subject: Re: [Qemu-devel] [PATCH v1 1/1] char-socket: Don't report TCP socket waiting as an error
Date: Thu, 8 Jun 2017 12:57:38 -0700	[thread overview]
Message-ID: <CAKmqyKMQyYObpsFd6hGe3zjPSJRKyWZqMGfuFSMJULzmvoD_eA@mail.gmail.com> (raw)
In-Reply-To: <871squz7l8.fsf@dusky.pond.sub.org>

On Thu, Jun 8, 2017 at 10:56 AM, Markus Armbruster <armbru@redhat.com> wrote:
> Alistair Francis <alistair.francis@xilinx.com> writes:
>
>> On Wed, Jun 7, 2017 at 11:03 PM, Markus Armbruster <armbru@redhat.com> wrote:
>>> Alistair Francis <alistair.francis@xilinx.com> writes:
>>>
>>>> On Wed, Jun 7, 2017 at 12:19 AM, Markus Armbruster <armbru@redhat.com> wrote:
>>>>> Paolo Bonzini <pbonzini@redhat.com> writes:
>>>>>
>>>>>> On 06/06/2017 18:30, Alistair Francis wrote:
>>>>>>>>
>>>>>>>> This is somehow confusing. I don't think it is worth having another
>>>>>>>> qemu_log_stderr() function rather than using error_report() but this very
>>>>>>>> call might deserve a comment explaining this unusual use. What do you think?
>>>>>>>
>>>>>>> The problem with stderr is that this isn't an error. Some uses of QEMU
>>>>>>> (inside Eclipse for example) flag everything printed on stderr as red
>>>>>>> which confuses users that they are seeing an error when they really
>>>>>>> aren't.
>>>>>>
>>>>>> But they are wrong.
>>>>>
>>>>> Concur.  We also print warnings and informational messages to stderr.
>>>>>
>>>>> We should make errors easy to recognize.  Fortunately, error_report()
>>>>> prints errors to stderr in a rigid format.  Unfortunately, error
>>>>> messages bypassing error_report() still exist in places.  We suck.
>>>>>
>>>>> The format is
>>>>>
>>>>>     timestamp-if-enabled progname ':' location message
>>>>>
>>>>> timestamp-if-enabled is normally empty.  With -msg timestamp=on, it's
>>>>> the current time in ISO 8601 format, followed by a space.
>>>>>
>>>>> progname is the program name (main()'s argv[0]).
>>>>>
>>>>> location is either empty, or a reference to the command line or a
>>>>> configuration file.
>>>>>
>>>>> See error_vreport() for details.
>>>>
>>>> Ok, but this isn't an error, it's more information. So it sounds like
>>>> we should still print to stderr but not print in the format described
>>>> above?
>>>
>>> Yes.
>>>
>>> I explained the error message format to show how to distinguish actual
>>> errors from other stuff.
>>
>> Sorry, I should have been more clear. I meant we should not use the
>> error_report() function here. I don't think we have any
>> warning_report() function though, is that something worth having?
>
> So far we simply use error_printf() for such things.
>
> A function to report a warning would let us report them more uniformly,
> but only if we actually use it uniformly.  In other words, adding one
> without also converting the existing warnings to use it would create yet
> another open-ended incremental conversion job.  Are we up to it?

Yeah! Why not. I am happy to give it a shot changing some errors to warnings.

First thing though, what is the format for printing warnings?

Thanks,
Alistair

>

  reply	other threads:[~2017-06-08 19:58 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-06-05 18:34 [Qemu-devel] [PATCH v1 1/1] char-socket: Don't report TCP socket waiting as an error Alistair Francis
2017-06-05 20:12 ` Philippe Mathieu-Daudé
2017-06-06 11:58 ` Marc-André Lureau
2017-06-06 13:37   ` Philippe Mathieu-Daudé
2017-06-06 16:30     ` Alistair Francis
2017-06-06 22:14       ` Paolo Bonzini
2017-06-06 23:55         ` Alistair Francis
2017-06-07  7:19         ` Markus Armbruster
2017-06-07 23:47           ` Alistair Francis
2017-06-08  6:03             ` Markus Armbruster
2017-06-08 16:53               ` Alistair Francis
2017-06-08 17:56                 ` Markus Armbruster
2017-06-08 19:57                   ` Alistair Francis [this message]
2017-06-09  5:16                     ` Markus Armbruster
2017-06-27 18:49                       ` Alistair Francis

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=CAKmqyKMQyYObpsFd6hGe3zjPSJRKyWZqMGfuFSMJULzmvoD_eA@mail.gmail.com \
    --to=alistair.francis@xilinx.com \
    --cc=armbru@redhat.com \
    --cc=f4bug@amsat.org \
    --cc=kraxel@redhat.com \
    --cc=marcandre.lureau@gmail.com \
    --cc=pbonzini@redhat.com \
    --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).