Re: [spice-common v2 1/7] log: Use glib for logging

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Nov 30, 2015 at 02:31:43PM -0500, Frediano Ziglio wrote:
> > +            g_setenv("G_MESSAGES_DEBUG", "all", FALSE);
> 
> Do not set environment in a library.
> This affects any usage of g_xxxx logging macros in the process (and
> possibly sub processes).

Yes, but I don't think there's a function in glib to configure this...
Note that this is only done when SPICE_DEBUG_LEVEL is used (which I
consider legacy after this commit). I can change this to "Spice" rather
than "all" so that it only affects spice-server logs, but
SPICE_DEBUG_LEVEL=xx G_MESSAGES_DEBUG=all is not going to work after
that, so probably better to change log level for all when using the
legacy method.

> I tried to see the interaction with Qemu and is quite hard to
> understand where the logging are going (mostly in Qemu is quite
> messy, there are logging to file, stderr, printfs, g_xxxx functions...
> quite messy). Staying to spice-common these changes put some logs
> to stdout and others to stderr. I don't know what will happen
> to solutions like Qemu, libvirt and so on. Are they collecting
> stdout and stderr all into a single file? This would make this change
> much less worrying me.

Qemu outputs to stdout/stderr, I don't think it writes to a file by
default. libvirt collects everything to a single file as far as I can
tell.

> Would like also to have some automated tests.

What kind of testing? That the expected logs are output depending on how
the environment variables are setup? Something else?

Christophe

Attachment: signature.asc
Description: PGP signature

_______________________________________________
Spice-devel mailing list
Spice-devel@xxxxxxxxxxxxxxxxxxxxx
http://lists.freedesktop.org/mailman/listinfo/spice-devel

[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]     [Monitors]