[Spice-devel] [spice-common RFC PATCH] spice-common: log: make error level the default abort level
Uri Lublin
uril at redhat.com
Sun Nov 11 03:28:02 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.
---
common/log.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
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