mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-18 15:51:11 +00:00
info: allow setting of GST_DEBUG levels by name
e.g. GST_DEBUG=*:INFO,*src:LOG
This commit is contained in:
parent
58560931db
commit
3d5f6202af
1 changed files with 19 additions and 3 deletions
|
@ -1630,10 +1630,26 @@ parse_debug_level (gchar * str, GstDebugLevel * level)
|
|||
if (str[0] != '\0' && str[1] == '\0'
|
||||
&& str[0] >= '0' && str[0] < '0' + GST_LEVEL_COUNT) {
|
||||
*level = (GstDebugLevel) (str[0] - '0');
|
||||
return TRUE;
|
||||
}
|
||||
} else if (strcmp (str, "ERROR") == 0) {
|
||||
*level = GST_LEVEL_ERROR;
|
||||
} else if (strncmp (str, "WARN", 4) == 0) {
|
||||
*level = GST_LEVEL_WARNING;
|
||||
} else if (strcmp (str, "FIXME") == 0) {
|
||||
*level = GST_LEVEL_FIXME;
|
||||
} else if (strcmp (str, "INFO") == 0) {
|
||||
*level = GST_LEVEL_INFO;
|
||||
} else if (strcmp (str, "DEBUG") == 0) {
|
||||
*level = GST_LEVEL_DEBUG;
|
||||
} else if (strcmp (str, "LOG") == 0) {
|
||||
*level = GST_LEVEL_LOG;
|
||||
} else if (strcmp (str, "TRACE") == 0) {
|
||||
*level = GST_LEVEL_TRACE;
|
||||
} else if (strcmp (str, "MEMDUMP") == 0) {
|
||||
*level = GST_LEVEL_MEMDUMP;
|
||||
} else
|
||||
return FALSE;
|
||||
|
||||
return FALSE;
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in a new issue