summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2019-04-26 12:28:25 +0200
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2019-05-08 09:50:21 +0200
commit1a04395959ca8cdca91f9da86b8580ef27025a5f (patch)
tree0e37e729a0bca4ab5ecb697947baa4f3e6baefa6
parent37b8d2f699ac6c80d653e94bad638122a6a1b3ef (diff)
downloadsystemd-1a04395959ca8cdca91f9da86b8580ef27025a5f.tar.gz
Enable log colors for most of tools in /usr/bin
When emitting the calendarspec warning we want to see some color. Follow-up for 04220fda5c. Exceptions: - systemctl, because it has a lot hand-crafted coloring - tmpfiles, sysusers, stdio-bridge, etc, because they are also used in services and I'm not sure if this wouldn't mess up something.
-rw-r--r--src/activate/activate.c1
-rw-r--r--src/analyze/analyze.c1
-rw-r--r--src/ask-password/ask-password.c1
-rw-r--r--src/busctl/busctl.c1
-rw-r--r--src/cgls/cgls.c1
-rw-r--r--src/cgtop/cgtop.c1
-rw-r--r--src/coredump/coredumpctl.c1
-rw-r--r--src/delta/delta.c1
-rw-r--r--src/detect-virt/detect-virt.c1
-rw-r--r--src/escape/escape.c1
-rw-r--r--src/hostname/hostnamectl.c1
-rw-r--r--src/id128/id128.c1
-rw-r--r--src/journal/cat.c1
-rw-r--r--src/journal/journalctl.c1
-rw-r--r--src/locale/localectl.c1
-rw-r--r--src/login/inhibit.c1
-rw-r--r--src/login/loginctl.c1
-rw-r--r--src/machine/machinectl.c1
-rw-r--r--src/mount/mount-tool.c1
-rw-r--r--src/network/networkctl.c1
-rw-r--r--src/notify/notify.c1
-rw-r--r--src/path/path.c1
-rw-r--r--src/portable/portablectl.c1
-rw-r--r--src/resolve/resolvectl.c1
-rw-r--r--src/run/run.c1
-rw-r--r--src/timedate/timedatectl.c1
26 files changed, 26 insertions, 0 deletions
diff --git a/src/activate/activate.c b/src/activate/activate.c
index 48aa617e78..8bdf2e50aa 100644
--- a/src/activate/activate.c
+++ b/src/activate/activate.c
@@ -474,6 +474,7 @@ int main(int argc, char **argv, char **envp) {
int r, n;
int epoll_fd = -1;
+ log_show_color(true);
log_parse_environment();
log_open();
diff --git a/src/analyze/analyze.c b/src/analyze/analyze.c
index 97d94516c8..09d26da0db 100644
--- a/src/analyze/analyze.c
+++ b/src/analyze/analyze.c
@@ -2104,6 +2104,7 @@ static int run(int argc, char *argv[]) {
setlocale(LC_ALL, "");
setlocale(LC_NUMERIC, "C"); /* we want to format/parse floats in C style */
+ log_show_color(true);
log_parse_environment();
log_open();
diff --git a/src/ask-password/ask-password.c b/src/ask-password/ask-password.c
index 4637c32819..ca6da40bbc 100644
--- a/src/ask-password/ask-password.c
+++ b/src/ask-password/ask-password.c
@@ -158,6 +158,7 @@ static int run(int argc, char *argv[]) {
char **p;
int r;
+ log_show_color(true);
log_parse_environment();
log_open();
diff --git a/src/busctl/busctl.c b/src/busctl/busctl.c
index 86efc02bd8..e702f9366a 100644
--- a/src/busctl/busctl.c
+++ b/src/busctl/busctl.c
@@ -2508,6 +2508,7 @@ static int busctl_main(int argc, char *argv[]) {
static int run(int argc, char *argv[]) {
int r;
+ log_show_color(true);
log_parse_environment();
log_open();
diff --git a/src/cgls/cgls.c b/src/cgls/cgls.c
index 09ee0e86a2..adc028bc8e 100644
--- a/src/cgls/cgls.c
+++ b/src/cgls/cgls.c
@@ -165,6 +165,7 @@ static void show_cg_info(const char *controller, const char *path) {
static int run(int argc, char *argv[]) {
int r, output_flags;
+ log_show_color(true);
log_parse_environment();
log_open();
diff --git a/src/cgtop/cgtop.c b/src/cgtop/cgtop.c
index f27c80120d..de958b57dd 100644
--- a/src/cgtop/cgtop.c
+++ b/src/cgtop/cgtop.c
@@ -909,6 +909,7 @@ static int run(int argc, char *argv[]) {
CGroupMask mask;
int r;
+ log_show_color(true);
log_parse_environment();
log_open();
diff --git a/src/coredump/coredumpctl.c b/src/coredump/coredumpctl.c
index b239d81945..e8aaa50235 100644
--- a/src/coredump/coredumpctl.c
+++ b/src/coredump/coredumpctl.c
@@ -1069,6 +1069,7 @@ static int run(int argc, char *argv[]) {
int r, units_active;
setlocale(LC_ALL, "");
+ log_show_color(true);
log_parse_environment();
log_open();
diff --git a/src/delta/delta.c b/src/delta/delta.c
index c28a816d67..63baa74794 100644
--- a/src/delta/delta.c
+++ b/src/delta/delta.c
@@ -639,6 +639,7 @@ static int parse_argv(int argc, char *argv[]) {
static int run(int argc, char *argv[]) {
int r, k, n_found = 0;
+ log_show_color(true);
log_parse_environment();
log_open();
diff --git a/src/detect-virt/detect-virt.c b/src/detect-virt/detect-virt.c
index f05f2279b3..7fb80ca138 100644
--- a/src/detect-virt/detect-virt.c
+++ b/src/detect-virt/detect-virt.c
@@ -128,6 +128,7 @@ static int run(int argc, char *argv[]) {
* to detect whether we are being run in a virtualized
* environment or not */
+ log_show_color(true);
log_parse_environment();
log_open();
diff --git a/src/escape/escape.c b/src/escape/escape.c
index 8b38d9f679..9066c30853 100644
--- a/src/escape/escape.c
+++ b/src/escape/escape.c
@@ -159,6 +159,7 @@ static int run(int argc, char *argv[]) {
char **i;
int r;
+ log_show_color(true);
log_parse_environment();
log_open();
diff --git a/src/hostname/hostnamectl.c b/src/hostname/hostnamectl.c
index 7f9bb49e0c..22de7350fe 100644
--- a/src/hostname/hostnamectl.c
+++ b/src/hostname/hostnamectl.c
@@ -432,6 +432,7 @@ static int run(int argc, char *argv[]) {
int r;
setlocale(LC_ALL, "");
+ log_show_color(true);
log_parse_environment();
log_open();
diff --git a/src/id128/id128.c b/src/id128/id128.c
index 60551ec225..4b370d700d 100644
--- a/src/id128/id128.c
+++ b/src/id128/id128.c
@@ -155,6 +155,7 @@ static int id128_main(int argc, char *argv[]) {
static int run(int argc, char *argv[]) {
int r;
+ log_show_color(true);
log_parse_environment();
log_open();
diff --git a/src/journal/cat.c b/src/journal/cat.c
index 9900bd2e86..c28f3b6d80 100644
--- a/src/journal/cat.c
+++ b/src/journal/cat.c
@@ -127,6 +127,7 @@ static int run(int argc, char *argv[]) {
_cleanup_close_ int outfd = -1, errfd = -1, saved_stderr = -1;
int r;
+ log_show_color(true);
log_parse_environment();
log_open();
diff --git a/src/journal/journalctl.c b/src/journal/journalctl.c
index 00489098ee..3479535ba7 100644
--- a/src/journal/journalctl.c
+++ b/src/journal/journalctl.c
@@ -2100,6 +2100,7 @@ int main(int argc, char *argv[]) {
int n_shown = 0, r, poll_fd = -1;
setlocale(LC_ALL, "");
+ log_show_color(true);
log_parse_environment();
log_open();
diff --git a/src/locale/localectl.c b/src/locale/localectl.c
index c8b195d9a6..9fb5152110 100644
--- a/src/locale/localectl.c
+++ b/src/locale/localectl.c
@@ -510,6 +510,7 @@ static int run(int argc, char *argv[]) {
int r;
setlocale(LC_ALL, "");
+ log_show_color(true);
log_parse_environment();
log_open();
diff --git a/src/login/inhibit.c b/src/login/inhibit.c
index 47fd9e874d..d96c8195a2 100644
--- a/src/login/inhibit.c
+++ b/src/login/inhibit.c
@@ -270,6 +270,7 @@ static int run(int argc, char *argv[]) {
_cleanup_(sd_bus_flush_close_unrefp) sd_bus *bus = NULL;
int r;
+ log_show_color(true);
log_parse_environment();
log_open();
diff --git a/src/login/loginctl.c b/src/login/loginctl.c
index 342ac56d90..fcd5e169a9 100644
--- a/src/login/loginctl.c
+++ b/src/login/loginctl.c
@@ -1529,6 +1529,7 @@ static int run(int argc, char *argv[]) {
int r;
setlocale(LC_ALL, "");
+ log_show_color(true);
log_parse_environment();
log_open();
diff --git a/src/machine/machinectl.c b/src/machine/machinectl.c
index d98027a0ca..51bad267d8 100644
--- a/src/machine/machinectl.c
+++ b/src/machine/machinectl.c
@@ -3100,6 +3100,7 @@ static int run(int argc, char *argv[]) {
int r;
setlocale(LC_ALL, "");
+ log_show_color(true);
log_parse_environment();
log_open();
diff --git a/src/mount/mount-tool.c b/src/mount/mount-tool.c
index b290095b0e..fcc4d4da61 100644
--- a/src/mount/mount-tool.c
+++ b/src/mount/mount-tool.c
@@ -1525,6 +1525,7 @@ static int run(int argc, char* argv[]) {
_cleanup_(sd_bus_flush_close_unrefp) sd_bus *bus = NULL;
int r;
+ log_show_color(true);
log_parse_environment();
log_open();
diff --git a/src/network/networkctl.c b/src/network/networkctl.c
index 3881aaa42b..4c51ad6a89 100644
--- a/src/network/networkctl.c
+++ b/src/network/networkctl.c
@@ -1128,6 +1128,7 @@ static void warn_networkd_missing(void) {
static int run(int argc, char* argv[]) {
int r;
+ log_show_color(true);
log_parse_environment();
log_open();
diff --git a/src/notify/notify.c b/src/notify/notify.c
index fff5233b0c..0b518e1604 100644
--- a/src/notify/notify.c
+++ b/src/notify/notify.c
@@ -151,6 +151,7 @@ static int run(int argc, char* argv[]) {
unsigned i = 0;
int r;
+ log_show_color(true);
log_parse_environment();
log_open();
diff --git a/src/path/path.c b/src/path/path.c
index 7b630a5714..568b5fb04b 100644
--- a/src/path/path.c
+++ b/src/path/path.c
@@ -171,6 +171,7 @@ static int parse_argv(int argc, char *argv[]) {
static int run(int argc, char* argv[]) {
int r;
+ log_show_color(true);
log_parse_environment();
log_open();
diff --git a/src/portable/portablectl.c b/src/portable/portablectl.c
index 2c59f04eb5..5041745b3d 100644
--- a/src/portable/portablectl.c
+++ b/src/portable/portablectl.c
@@ -956,6 +956,7 @@ static int run(int argc, char *argv[]) {
int r;
+ log_show_color(true);
log_parse_environment();
log_open();
diff --git a/src/resolve/resolvectl.c b/src/resolve/resolvectl.c
index 1d2fc71309..9637e00e60 100644
--- a/src/resolve/resolvectl.c
+++ b/src/resolve/resolvectl.c
@@ -3137,6 +3137,7 @@ static int run(int argc, char **argv) {
int r;
setlocale(LC_ALL, "");
+ log_show_color(true);
log_parse_environment();
log_open();
diff --git a/src/run/run.c b/src/run/run.c
index f200b28dfe..05c1552a8b 100644
--- a/src/run/run.c
+++ b/src/run/run.c
@@ -1652,6 +1652,7 @@ static int run(int argc, char* argv[]) {
_cleanup_free_ char *description = NULL;
int r, retval = EXIT_SUCCESS;
+ log_show_color(true);
log_parse_environment();
log_open();
diff --git a/src/timedate/timedatectl.c b/src/timedate/timedatectl.c
index 406ca1df66..e03f1796e7 100644
--- a/src/timedate/timedatectl.c
+++ b/src/timedate/timedatectl.c
@@ -866,6 +866,7 @@ static int run(int argc, char *argv[]) {
int r;
setlocale(LC_ALL, "");
+ log_show_color(true);
log_parse_environment();
log_open();