tools/debug-events: print bugs in bold red

Part-of: <https://gitlab.freedesktop.org/libinput/libinput/-/merge_requests/1013>
This commit is contained in:
Peter Hutterer 2024-11-01 16:00:12 +10:00
parent 3f3071cb88
commit 49bbef6468

View file

@ -70,7 +70,12 @@ log_handler(struct libinput *li,
if (is_tty) {
if (priority >= LIBINPUT_LOG_PRIORITY_ERROR) {
printf(ANSI_RED);
if (strstr(format, "client bug: ") ||
strstr(format, "libinput bug: ") ||
strstr(format, "kernel bug: "))
printf(ANSI_BRIGHT_RED);
else
printf(ANSI_RED);
} else if (priority >= LIBINPUT_LOG_PRIORITY_INFO) {
printf(ANSI_HIGHLIGHT);
} else if (priority == LIBINPUT_LOG_PRIORITY_DEBUG) {