summaryrefslogtreecommitdiff
path: root/src/systemctl/systemctl.c
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2012-07-26 16:50:35 +0200
committerLennart Poettering <lennart@poettering.net>2012-07-26 16:56:21 +0200
commit498261871dfa2a930ec84b13a176e3bdc43aa212 (patch)
tree842bc005ca763ddc075ded82b0b74ec80f35d05e /src/systemctl/systemctl.c
parent46b0d922256b62bc8291951d9868c243ced80c9a (diff)
journalctl: hightlight log lines by priority
warn/notice = bright white < error = red
Diffstat (limited to 'src/systemctl/systemctl.c')
-rw-r--r--src/systemctl/systemctl.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/systemctl/systemctl.c b/src/systemctl/systemctl.c
index ef8ab2dc14..e74f18630d 100644
--- a/src/systemctl/systemctl.c
+++ b/src/systemctl/systemctl.c
@@ -2584,9 +2584,12 @@ static void print_status_info(UnitStatusInfo *i) {
}
if (i->id && arg_transport != TRANSPORT_SSH) {
- int flags = (arg_lines*OUTPUT_SHOW_ALL |
- arg_follow*OUTPUT_FOLLOW |
- !arg_quiet*OUTPUT_WARN_CUTOFF);
+ int flags =
+ arg_lines * OUTPUT_SHOW_ALL |
+ arg_follow * OUTPUT_FOLLOW |
+ !arg_quiet * OUTPUT_WARN_CUTOFF |
+ on_tty() * OUTPUT_COLOR;
+
printf("\n");
show_journal_by_unit(i->id, arg_output, 0,
i->inactive_exit_timestamp_monotonic,