On Mon, Jan 21, 2019 at 06:04:35PM +0100, Christophe Fergeau wrote: > 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. > This commit also adds a call to qemu_init_logging() to the binaries > installed by QEMU. > glib debug messages are enabled through G_MESSAGES_DEBUG similarly to > glib default log handler. > > At the moment, this change will mostly impact SPICE logging if your > spice version is >= 0.14.1. With older spice versions, this is not going > to work as expected, but will not have any ill effect, so this call is > not conditional on the SPICE version. > > Signed-off-by: Christophe Fergeau <cferg...@redhat.com> > Reviewed-by: Daniel P. Berrangé <berra...@redhat.com> > Reviewed-by: Stefan Hajnoczi <stefa...@redhat.com> > --- > One more iteration of the patch as it hit CI failures > (https://patchew.org/QEMU/20181214105642.673-1-cferg...@redhat.com/ ) > Only difference from v4 is the addition of #include "qemu/error-report.h" > in bsd-user and linux-user. > > > bsd-user/main.c | 2 ++ > include/qemu/error-report.h | 2 ++ > linux-user/main.c | 2 ++ > qemu-img.c | 1 + > qemu-io.c | 1 + > qemu-nbd.c | 1 + > scsi/qemu-pr-helper.c | 1 + > util/qemu-error.c | 47 +++++++++++++++++++++++++++++++++++++ > vl.c | 1 + > 9 files changed, 58 insertions(+)
Reviewed-by: Stefan Hajnoczi <stefa...@redhat.com>
signature.asc
Description: PGP signature