Re: [RFC PATCH] log: warn on spice_return*_if_fail instead of aborting

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

 



Hi

----- Mensaje original -----
> Currently log level for spice_return_if_fail and
> spice_return_val_if_failed
> functions (#define macros really) is SPICE_LOG_LEVEL_CRITICAL.
> By default spice abort level is SPICE_LOG_LEVEL_CRITICAL.
> That means the program aborts upon a call to spice_return_if_fail
> functions.
> 
> This patch changes the log level for spice_return_if_fail functions
> to SPICE_LOG_LEVEL_WARNING, such that a warning message
> is written to log, and the program continues.

This will differ from glib. The log level for g_return_if_fail is critical, but glib doesn't abort by default at this level, unless given G_DEBUG=fatal_criticals. The idea was to stay close to glib behaviour, in order to be easier to learn and easier to switch to glib eventually in the future.

Imho, the Spice server shouldn't crash on critical either. This can be tuned at compile time or at run-time with the SPICE_ABORT_LEVEL.

so small nack for the above reasons.
_______________________________________________
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]