[Spice-devel] [spice-common PATCH 2/2] common: log: make error level the default abort level

Uri Lublin uril at redhat.com
Thu Dec 13 09:54:13 PST 2012


Instead of current abort level default which is critical level.

The spice_return_if_fail and spice_return_val_if_fail macros
log with critical level upon failure. This currently aborts
the program.
Instead it's better to log an error message and let the application
continue running.

diff --git a/common/log.c b/common/log.c
index 5e2db4c..8bf87d6 100644
--- a/common/log.c
+++ b/common/log.c
@@ -64,7 +64,7 @@ static const char * spice_log_level_to_string(SpiceLogLevel level)
 #ifdef SPICE_DISABLE_ABORT
 #define SPICE_ABORT_LEVEL_DEFAULT -1
 #else
-#define SPICE_ABORT_LEVEL_DEFAULT SPICE_LOG_LEVEL_CRITICAL
+#define SPICE_ABORT_LEVEL_DEFAULT SPICE_LOG_LEVEL_ERROR
 #endif
 #endif
 
-- 
1.7.1



More information about the Spice-devel mailing list