mirror of
https://gitlab.uni-freiburg.de/opensourcevdi/spice-common
synced 2026-01-11 18:10:16 +00:00
log: Clamp SPICE_DEBUG_LEVEL if it's too high
This matches how SPICE_DEBUG_LEVEL behaved before switching to glib logging.
This commit is contained in:
parent
6c7552d543
commit
6a65f470d1
@ -67,6 +67,9 @@ static void spice_log_set_debug_level(void)
|
||||
/* FIXME: To be removed after enough deprecation time */
|
||||
g_warning("Setting SPICE_DEBUG_LEVEL is deprecated, use G_MESSAGES_DEBUG instead");
|
||||
debug_level = atoi(debug_str);
|
||||
if (debug_level > SPICE_LOG_LEVEL_DEBUG) {
|
||||
debug_level = SPICE_LOG_LEVEL_DEBUG;
|
||||
}
|
||||
glib_debug_level = spice_log_level_to_glib(debug_level);
|
||||
|
||||
/* If the debug level is too high, make sure we don't try to enable
|
||||
|
||||
Loading…
Reference in New Issue
Block a user