[Spice-devel] spice-server, logging and style

Marc-André Lureau mlureau at redhat.com
Tue Nov 3 07:03:36 PST 2015



----- Original Message -----
> Hi
> 
> ----- Original Message -----
> > On Tue, Nov 03, 2015 at 09:17:29AM -0500, Marc-André Lureau wrote:
> > > > - from a first time readers spice_return_if_fail and
> > > > spice_return_val_if_fail
> > > >   do not suggest function is doing some logging. Also they use critical
> > > >   level which by default cause program abortion.
> > > 
> > > they follow the behaviour of g_return*
> > 
> > They follow the behaviour of g_return_ in the sense that they log a
> > critical, however a significant difference is that glib does not abort
> > by default for criticals while spice-common does.
> 
> iirc, this was done in order to follow the existing checks that aborted too
> (see commit c1403ee6 in spice-common)
> 
> The server code is bad at handling errors in general. It's another area
> awaiting for improvements. Then SPICE_ABORT_LEVEL_DEFAULT can be changed
> to not abort on critical.
> 

btw, similarly, glib can have different fatal levels (or mask)


More information about the Spice-devel mailing list