Re: [spice-common v3 2/7] log: Use glib for logging

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

 



On Wed, Dec 16, 2015 at 03:05:07PM +0100, Victor Toso wrote:
> Hi,
> 
> On Wed, Dec 16, 2015 at 02:27:08PM +0100, Christophe Fergeau wrote:
> > spice-common has been duplicating glib logging methods for a long while.
> > Now that spice-common is depending on glib, it's more consistent to use
> > glib logging too. However, the code base is still using spice logging
> > functions.
> > This commit aims to make spice logging go through glib logging system,
> > while keeping the same behaviour for the SPICE_ABORT_LEVEL and
> > SPICE_DEBUG_LEVEL environment variables. They are deprecated however in
> > favour of the glib alternatives (G_DEBUG and G_MESSAGES_DEBUG).
> 
> Have you consider using G_LOG_DOMAIN for default domain?

This would require more changes in spice/spice-gtk, as we cannot do
#ifndef G_LOG_DOMAIN
#define G_LOG_DOMAIN "foo"
#endif

because by the time log.h is included, glib.h has most likely been
included already by another header, and glib.h sets G_LOG_DOMAIN to ""
if it's not already set. I think it's better to keep these patches
self-contained for now, the default log domain can be changed at a later
point.

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]