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