[Spice-devel] [PATCH spice-gtk 1/2] Use single log domain

Frediano Ziglio fziglio at redhat.com
Tue Mar 14 12:25:16 UTC 2017


> 
> g_debug uses G_LOG_DOMAIN, spice_debug uses SPICE_LOG_DOMAIN
> Make them use only one domain - GSpice
> ---
>  src/Makefile.am | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/src/Makefile.am b/src/Makefile.am
> index 4fa7357..1043dbe 100644
> --- a/src/Makefile.am
> +++ b/src/Makefile.am
> @@ -71,6 +71,7 @@ KEYMAP_CSV = keycodemapdb/data/keymaps.csv
>  SPICE_COMMON_CPPFLAGS =						\
>  	-DSPICE_COMPILATION					\
>  	-DG_LOG_DOMAIN=\"GSpice\"				\
> +	-DSPICE_LOG_DOMAIN=G_LOG_DOMAIN				\
>  	-DSPICE_GTK_LOCALEDIR=\"${SPICE_GTK_LOCALEDIR}\"	\
>  	-DPNP_IDS=\""$(PNP_IDS)"\"				\
>  	-DUSB_IDS=\""$(USB_IDS)"\"				\

Maybe would be better to avoid to use SPICE_LOG_DOMAIN in spice-common
and use directly G_LOG_DOMAIN ?

Or change

#ifndef SPICE_LOG_DOMAIN
#define SPICE_LOG_DOMAIN "Spice"
#endif

to

#ifndef SPICE_LOG_DOMAIN
#  ifdef G_LOG_DOMAIN
#    define SPICE_LOG_DOMAIN G_LOG_DOMAIN
#  else
#    define SPICE_LOG_DOMAIN "Spice"
#  endif
#endif

Frediano


More information about the Spice-devel mailing list