Commit e74040b4 authored by Chris White's avatar Chris White

gstinfo: colorize PIDs in log messages

The PIDs on log lines were supposed to be colorized before, but the
escape sequence was incorrect.  With this change, the code uses the
correct sequence to colorize those PIDs.  E.g., instead of `\033[334m`
(incorrect), use `\033[34m` (correct).

This makes the log messages easier to read.  It also reduces the chance
that a buggy terminal will choke on the invalid escape sequence.


Part-of: <gstreamer/gstreamer!689>
parent f6ce1686
......@@ -1278,7 +1278,7 @@ gst_debug_log_default (GstDebugCategory * category, GstDebugLevel level,
color = gst_debug_construct_term_color (gst_debug_category_get_color
clear = "\033[00m";
g_sprintf (pidcolor, "\033[3%1dm", pid % 6 + 31);
g_sprintf (pidcolor, "\033[%02dm", pid % 6 + 31);
levelcolor = levelcolormap[level];
#define PRINT_FMT " %s"PID_FMT"%s "PTR_FMT" %s%s%s %s"CAT_FMT"%s %s\n"
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment