Blame SOURCES/0119-logs-show-use-grey-color-for-de-emphasizing-journal-.patch

a3e2b5
From 67b548434f258224239e41672478a0038d5c9d30 Mon Sep 17 00:00:00 2001
a3e2b5
From: Lennart Poettering <lennart@poettering.net>
a3e2b5
Date: Wed, 5 Dec 2018 18:42:32 +0100
a3e2b5
Subject: [PATCH] logs-show: use grey color for de-emphasizing journal log
a3e2b5
 output
a3e2b5
a3e2b5
(cherry picked from commit 67df9b7a06d749fdd84f19f7d75ccf0d743f6d72)
a3e2b5
a3e2b5
Resolves: #1695601
a3e2b5
---
a3e2b5
 src/basic/terminal-util.h | 2 ++
a3e2b5
 src/shared/logs-show.c    | 4 ++++
a3e2b5
 2 files changed, 6 insertions(+)
a3e2b5
a3e2b5
diff --git a/src/basic/terminal-util.h b/src/basic/terminal-util.h
a3e2b5
index c0bd0e67a6..0055b72343 100644
a3e2b5
--- a/src/basic/terminal-util.h
a3e2b5
+++ b/src/basic/terminal-util.h
a3e2b5
@@ -18,6 +18,7 @@
a3e2b5
 #define ANSI_MAGENTA "\x1B[0;35m"
a3e2b5
 #define ANSI_CYAN    "\x1B[0;36m"
a3e2b5
 #define ANSI_WHITE   "\x1B[0;37m"
a3e2b5
+#define ANSI_GREY    "\x1B[0;2;37m"
a3e2b5
 
a3e2b5
 /* Bold/highlighted */
a3e2b5
 #define ANSI_HIGHLIGHT_BLACK   "\x1B[0;1;30m"
a3e2b5
@@ -129,6 +130,7 @@ DEFINE_ANSI_FUNC(highlight_yellow,           HIGHLIGHT_YELLOW);
a3e2b5
 DEFINE_ANSI_FUNC(highlight_blue,             HIGHLIGHT_BLUE);
a3e2b5
 DEFINE_ANSI_FUNC(highlight_magenta,          HIGHLIGHT_MAGENTA);
a3e2b5
 DEFINE_ANSI_FUNC(normal,                     NORMAL);
a3e2b5
+DEFINE_ANSI_FUNC(grey,                       GREY);
a3e2b5
 
a3e2b5
 DEFINE_ANSI_FUNC_UNDERLINE(underline,                  UNDERLINE, NORMAL);
a3e2b5
 DEFINE_ANSI_FUNC_UNDERLINE(highlight_underline,        HIGHLIGHT_UNDERLINE, HIGHLIGHT);
a3e2b5
diff --git a/src/shared/logs-show.c b/src/shared/logs-show.c
a3e2b5
index 33afbe2f7f..c66e39d2fe 100644
a3e2b5
--- a/src/shared/logs-show.c
a3e2b5
+++ b/src/shared/logs-show.c
a3e2b5
@@ -170,6 +170,10 @@ static bool print_multiline(
a3e2b5
                         color_on = ANSI_HIGHLIGHT;
a3e2b5
                         color_off = ANSI_NORMAL;
a3e2b5
                         highlight_on = ANSI_HIGHLIGHT_RED;
a3e2b5
+                } else if (priority >= LOG_DEBUG) {
a3e2b5
+                        color_on = ANSI_GREY;
a3e2b5
+                        color_off = ANSI_NORMAL;
a3e2b5
+                        highlight_on = ANSI_HIGHLIGHT_RED;
a3e2b5
                 }
a3e2b5
         }
a3e2b5