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

Submitted by Uri Lublin on Dec. 13, 2012, 5:54 p.m.

Details

Message ID 3ee90fa61c47e1eafd4a4e2ba18b029a1f89547c.1355421013.git.uril@redhat.com
State New
Headers show

Not browsing as part of any series.

Commit Message

Uri Lublin Dec. 13, 2012, 5:54 p.m.
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.

Patch hide | download patch | download mbox

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