[Spice-devel] [PATCH spice-common 3/4] RFC: Add spice log categories

Christophe Fergeau cfergeau at redhat.com
Mon Jun 12 15:51:16 UTC 2017


On Mon, Jun 12, 2017 at 05:41:26PM +0200, Christophe Fergeau wrote:
> On Mon, Jun 12, 2017 at 12:19:53PM +0400, marcandre.lureau at redhat.com wrote:
> > From: Marc-André Lureau <marcandre.lureau at redhat.com>
> > 
> > A log category is defined with SPICE_LOG_CATEGORY(). The macro will
> > register a structure with a constructor (and unregister it on
> > unloading with a destructor).
> > 
> > spice_log_init() must be called at initialization time, to set enabled
> > categories and add the 'Spice' glib domain to G_MESSAGES_DEBUG (NB: if
> > useful, we could have other log domains automatically associated with
> > categories and enable them too).
> > 
> > A category can be enabled with SPICE_DEBUG="cat_name foo*" (*? are
> > accepted glob-like wildcards). All categories are enabled with
> > SPICE_DEBUG=1 or 'all'. To list available categories, you can run the
> > program with SPICE_DEBUG=help.
> 
> Not really a review, nor things to change right now, but
> hopefully this can map to command-line arguments as well. Why " " as a
> separator rather than ":"?

Ah ok, similar to G_MESSAGES_DEBUG which I wrongly assumed to be using ":" as a
separator ;)

Christophe
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 801 bytes
Desc: not available
URL: <https://lists.freedesktop.org/archives/spice-devel/attachments/20170612/d4f20feb/attachment.sig>


More information about the Spice-devel mailing list