On (Tue) Jan 20 2009 [12:35:23], Jan Kiszka wrote:
> Amit Shah wrote:
> > This patch adds the ability to selectively enable asynchronous notifications
> > from individual qemu subsystems by a new 'notify' monitor command.
> >
> > This is helpful for programs currently parsing monitor output.
> >
> > A sample invocation will look like this:
> >
> > (qemu)
> > <vnc connection closed>
> > (qemu) notify vnc on
> > <vnc connection closed>
> > (qemu) # VNC: Closing down connection 127.0.0.1:1
> >
> > Notice that the output is prefixed by '#'. Also, it will appear on the
> > line that has '(qemu) ' already output on it.
>
> I understand the need, but the result looks a bit ugly, at least to
> humans forced to parse it. If you get this while in the middle of type a
> command... Moreover, is it impossible that such an async notification is
> issued while some other subsystem is already dumping a multi-line
> message to the monitor (using multiple prints)? That would be really
> problematic.
Agreed. However, note that the messages sent via term_printf_async()
will only be emitted if 'notify <foo> on' is issued. Humans wouldn't
normally do that.