From: Stefan Hajnoczi <stefanha@gmail.com>
To: Seiji Aguchi <seiji.aguchi@hds.com>
Cc: "kwolf@redhat.com" <kwolf@redhat.com>,
"aliguori@us.ibm.com" <aliguori@us.ibm.com>,
"mtosatti@redhat.com" <mtosatti@redhat.com>,
"qemu-devel@nongnu.org" <qemu-devel@nongnu.org>,
"armbru@redhat.com" <armbru@redhat.com>,
"dle-develop@lists.sourceforge.net"
<dle-develop@lists.sourceforge.net>,
Tomoki Sekiyama <tomoki.sekiyama@hds.com>,
"pbonzini@redhat.com" <pbonzini@redhat.com>,
"lcapitulino@redhat.com" <lcapitulino@redhat.com>,
"lersek@redhat.com" <lersek@redhat.com>
Subject: Re: [Qemu-devel] [PATCH v5] Add timestamp to error_report()
Date: Thu, 4 Jul 2013 10:49:07 +0200 [thread overview]
Message-ID: <20130704084907.GC2945@stefanha-thinkpad.redhat.com> (raw)
In-Reply-To: <A5ED84D3BB3A384992CBB9C77DEDA4D443E176CC@USINDEM103.corp.hds.com>
On Thu, Jul 04, 2013 at 02:57:13AM +0000, Seiji Aguchi wrote:
>
>
> > -----Original Message-----
> > From: Stefan Hajnoczi [mailto:stefanha@gmail.com]
> > Sent: Wednesday, July 03, 2013 5:14 AM
> > To: Seiji Aguchi
> > Cc: qemu-devel@nongnu.org; aliguori@us.ibm.com; berrange@redhat.com; kwolf@redhat.com; mtosatti@redhat.com;
> > armbru@redhat.com; Tomoki Sekiyama; pbonzini@redhat.com; lcapitulino@redhat.com; lersek@redhat.com; eblake@redhat.com;
> > dle-develop@lists.sourceforge.net
> > Subject: Re: [PATCH v5] Add timestamp to error_report()
> >
> > On Tue, Jul 02, 2013 at 02:09:24PM +0000, Seiji Aguchi wrote:
> > >
> > >
> > > > > +DEF("msg", HAS_ARG, QEMU_OPTION_msg,
> > > > > + "-msg [timestamp=on|off]\n"
> > > > > + " change the format of messages\n"
> > > > > + " timestamp=on|off enables leading timestamps (default:on)\n",
> > > > > + QEMU_ARCH_ALL)
> > > > > +STEXI
> > > > > +@item -msg timestamp=on|off
> > > > > +@findex -msg
> > > > > +prepend a timestamp to each log message.
> > > > > +(disabled by default)
> > > > > +ETEXI
> > > >
> > > > I am confused. If the user specifies -msg then enable_timestamp_msg is
> > > > on by default. If the user does not specify -msg then
> > > > enable_timestmap_msg is off. Did I get that right?
> > >
> > > Yes.
> > >
> > > >
> > > > This means that the default behavior of QEMU does not change but you can
> > > > add -msg to enable timestamps.
> > > >
> > > > I'm happy with this but find the documentation confusing.
> > >
> > > I can remove "(disabled by default)" if needed.
> >
> > Perhaps the simplest solution is timestamp=off by default. Then there
> > can be no confusion and users must do -msg timestamp=on to enable
> > timestamps.
> >
> > If you really want to keep -msg as a shortcut for -msg timestamp=on,
> > then please document explicitly that:
> > 1. Without -msg timestamps are off.
> > 1. With -msg timestamps are on.
> > 2. -msg timestamp=off can be used to turn timestamps off again.
>
> My apologies for the confusion.
>
> The syntax, "-msg [timestamp=on|off]", was wrong.
> "-msg timestamp[=on|off]" is correct.
>
> And there is no way to make "timestamp" optional, as far as I looked into a source code.
> Therefore, the explanation should be as below.
> (I think it is reasonable to keep "-msg timestamp" as a shortcut for -msg timestamp=on.)
Yes, I think you are correct. I thought previously that "-msg" works
but it seems an option is always required.
> <snip>
> +DEF("msg", HAS_ARG, QEMU_OPTION_msg,
> + "-msg timestamp[=on|off]\n"
> + " change the format of messages\n"
> + " on|off controls leading timestamps (default:on)\n",
> + QEMU_ARCH_ALL)
> +STEXI
> +@item -msg timestamp[=on|off]
> +@findex -msg
> +prepend a timestamp to each log message.(default:on)
> +ETEXI
> <snip>
>
> To be simpler, we may be able to introduce just a single -msg-timestamp.
> But I think current "-msg timestamp[=on|off]" is reasonable
> because other options may be introduced to msg, like log_level or debug.
Yep.
Stefan
prev parent reply other threads:[~2013-07-04 8:49 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-07-01 18:54 [Qemu-devel] [PATCH v5] Add timestamp to error_report() Seiji Aguchi
2013-07-02 6:47 ` Laszlo Ersek
2013-07-02 9:09 ` Stefan Hajnoczi
2013-07-02 14:09 ` Seiji Aguchi
2013-07-03 9:10 ` Stefan Hajnoczi
2013-07-04 2:57 ` Seiji Aguchi
2013-07-03 9:13 ` Stefan Hajnoczi
2013-07-04 2:57 ` Seiji Aguchi
2013-07-04 8:49 ` Stefan Hajnoczi [this message]
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=20130704084907.GC2945@stefanha-thinkpad.redhat.com \
--to=stefanha@gmail.com \
--cc=aliguori@us.ibm.com \
--cc=armbru@redhat.com \
--cc=dle-develop@lists.sourceforge.net \
--cc=kwolf@redhat.com \
--cc=lcapitulino@redhat.com \
--cc=lersek@redhat.com \
--cc=mtosatti@redhat.com \
--cc=pbonzini@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=seiji.aguchi@hds.com \
--cc=tomoki.sekiyama@hds.com \
/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).