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