[Spice-devel] [PATCH 11/18] worker: use spice_return_if_fail() instead of spice_assert() in release_item

Frediano Ziglio fziglio at redhat.com
Tue Nov 24 05:03:45 PST 2015


> 
> On Tue, Nov 24, 2015 at 06:19:18AM -0500, Frediano Ziglio wrote:
> > > If g_return_if_fail() is deemed good-enough here, why not use it now and
> > > have one less spice_return_if_fail() to come back to and change?
> > 
> > In the logging thread (actually the two thread) many people (like djasha
> > and
> > Francois) didn't agreed on using two API for logging for different reasons
> > and I personally agree with them.
> 
> I believe
> http://lists.freedesktop.org/archives/spice-devel/2015-November/024205.html
> provides one possible solution to this concern.
> 
> Christophe
> 

I miss this mail.

Did you try it? By default you set the abort level to SPICE_LOG_LEVEL_WARNING.
You should probably call g_log_set_always_fatal even for default setting.
Also note that the default handler output info and debug information to stdout
instead of stderr but probably this can be changed using domains and
setting handlers.

It make sense, make spice_* macros behave like g_* macros.

I would also make sure that G_DISABLE_CHECKS is not defined, I imagine this could
be done adding an "#undef G_DISABLE_CHECKS" to the config.h.

Frediano


More information about the Spice-devel mailing list