mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-27 09:38:17 +00:00
info: simply some more
This commit is contained in:
parent
ca33a78881
commit
3857d902c3
1 changed files with 8 additions and 11 deletions
|
@ -784,30 +784,27 @@ gst_debug_log_default (GstDebugCategory * category, GstDebugLevel level,
|
||||||
#undef PRINT_FMT
|
#undef PRINT_FMT
|
||||||
g_free (color);
|
g_free (color);
|
||||||
#else
|
#else
|
||||||
gint pidcolor, levelcolor, color, pid;
|
|
||||||
const gint clear = FOREGROUND_RED | FOREGROUND_GREEN | FOREGROUND_BLUE;
|
const gint clear = FOREGROUND_RED | FOREGROUND_GREEN | FOREGROUND_BLUE;
|
||||||
|
#define SET_COLOR(c) \
|
||||||
|
SetConsoleTextAttribute (GetStdHandle (STD_ERROR_HANDLE), (c));
|
||||||
/* timestamp */
|
/* timestamp */
|
||||||
g_printerr ("%" GST_TIME_FORMAT " ", GST_TIME_ARGS (elapsed));
|
g_printerr ("%" GST_TIME_FORMAT " ", GST_TIME_ARGS (elapsed));
|
||||||
/* pid */
|
/* pid */
|
||||||
pidcolor = available_colors[pid % 6];
|
SET_COLOR (available_colors[pid % 6]);
|
||||||
SetConsoleTextAttribute (GetStdHandle (STD_ERROR_HANDLE), pidcolor);
|
|
||||||
g_printerr (PID_FMT, pid);
|
g_printerr (PID_FMT, pid);
|
||||||
/* thread */
|
/* thread */
|
||||||
SetConsoleTextAttribute (GetStdHandle (STD_ERROR_HANDLE), clear);
|
SET_COLOR (clear);
|
||||||
g_printerr (" " PTR_FMT " ", g_thread_self ());
|
g_printerr (" " PTR_FMT " ", g_thread_self ());
|
||||||
/* level */
|
/* level */
|
||||||
levelcolor = levelcolormap[level];
|
SET_COLOR (levelcolormap[level]);
|
||||||
SetConsoleTextAttribute (GetStdHandle (STD_ERROR_HANDLE), levelcolor);
|
|
||||||
g_printerr ("%s ", gst_debug_level_get_name (level));
|
g_printerr ("%s ", gst_debug_level_get_name (level));
|
||||||
/* category */
|
/* category */
|
||||||
color = gst_debug_construct_win_color (gst_debug_category_get_color
|
SET_COLOR (gst_debug_construct_win_color (gst_debug_category_get_color
|
||||||
(category));
|
(category)));
|
||||||
SetConsoleTextAttribute (GetStdHandle (STD_ERROR_HANDLE), color);
|
|
||||||
g_printerr (CAT_FMT, gst_debug_category_get_name (category),
|
g_printerr (CAT_FMT, gst_debug_category_get_name (category),
|
||||||
file, line, function, obj);
|
file, line, function, obj);
|
||||||
/* message */
|
/* message */
|
||||||
SetConsoleTextAttribute (GetStdHandle (STD_ERROR_HANDLE), clear);
|
SET_COLOR (clear);
|
||||||
g_printerr (" %s\n", gst_debug_message_get (message));
|
g_printerr (" %s\n", gst_debug_message_get (message));
|
||||||
#endif
|
#endif
|
||||||
} else {
|
} else {
|
||||||
|
|
Loading…
Reference in a new issue