"Dr. David Alan Gilbert" <[email protected]> writes: > * Markus Armbruster ([email protected]) wrote: >> Christophe Fergeau <[email protected]> writes: >> >> > This commit adds a qemu_init_logging() helper which calls >> > g_log_set_default_handler() so that glib logs (g_log, g_warning, ...) >> > are handled similarly to other QEMU logs. This means they will get a >> > timestamp if timestamps are enabled, and they will go through the >> > monitor if one is configured. >> >> s/monitor/HMP monitor/ >> >> I see why one would like to extend the timestamp feature to GLib log >> messages. Routing them through the HMP monitor is perhaps debatable. >> Cc: Dave in case he has an opinion. > > Yes, it's a little odd; what's wrong with stderr for this type of thing? > My experience has been that things like spice errors are fairly > asynchronous rather than directly triggered by commands, so maybe less > suitable for interleaving in the monitor.
Fortunately, error_printf() & friends print to an HMP monitor only when the current thread is running in HMP monitor context. > While stderr and hmp output are normally the same, if someone has > HMP wired to a script, I'd assume this is more likely to break it. Programs consuming HMP output are brittle. While we don't break them just because we can, we do change HMP output without worrying about them whenever we feel the change is an improvement for *human* readers. Another possible concern is messages vanishing from stderr.
