]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
Enable log colors for most of tools in /usr/bin
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Fri, 26 Apr 2019 10:28:25 +0000 (12:28 +0200)
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Wed, 8 May 2019 07:50:21 +0000 (09:50 +0200)
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.

26 files changed:
src/activate/activate.c
src/analyze/analyze.c
src/ask-password/ask-password.c
src/busctl/busctl.c
src/cgls/cgls.c
src/cgtop/cgtop.c
src/coredump/coredumpctl.c
src/delta/delta.c
src/detect-virt/detect-virt.c
src/escape/escape.c
src/hostname/hostnamectl.c
src/id128/id128.c
src/journal/cat.c
src/journal/journalctl.c
src/locale/localectl.c
src/login/inhibit.c
src/login/loginctl.c
src/machine/machinectl.c
src/mount/mount-tool.c
src/network/networkctl.c
src/notify/notify.c
src/path/path.c
src/portable/portablectl.c
src/resolve/resolvectl.c
src/run/run.c
src/timedate/timedatectl.c

index 48aa617e784209a7a1a062d4f3bdd6e5ce6d0f63..8bdf2e50aae43f1c71dc559e056e9ccf424cca77 100644 (file)
@@ -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();
 
index 97d94516c87c2f57f9fb18aa3bb89f56d38eaddd..09d26da0db46bbf5bea81e6e9add16abcc4bb998 100644 (file)
@@ -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();
 
index 4637c3281931a4261d6dabf19183d98adbbad607..ca6da40bbc96763ce987844a0ab9eb81437e254b 100644 (file)
@@ -158,6 +158,7 @@ static int run(int argc, char *argv[]) {
         char **p;
         int r;
 
+        log_show_color(true);
         log_parse_environment();
         log_open();
 
index 86efc02bd8c32da09721c9d44001c2d8aff9915c..e702f9366a9fa032baafa9ada4332722f3261ca5 100644 (file)
@@ -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();
 
index 09ee0e86a24f6d8a735e27d42bd2213d28726014..adc028bc8e655418b1ea1983ee1d42c554b8a8dc 100644 (file)
@@ -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();
 
index f27c80120d6e57be40c8bd5392d53ddbf3d6c9c1..de958b57dd0ca16d5399aac7adcff57824fe6dd0 100644 (file)
@@ -909,6 +909,7 @@ static int run(int argc, char *argv[]) {
         CGroupMask mask;
         int r;
 
+        log_show_color(true);
         log_parse_environment();
         log_open();
 
index b239d8194512f8f24187dc4bc58da437e719ea49..e8aaa502352f40c70a468ae3f1d71b9222bf7bdf 100644 (file)
@@ -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();
 
index c28a816d6774abee7090f40d1faab3f04ee2a6f7..63baa747949e590c8c55bf62a59bea834a4ad7bd 100644 (file)
@@ -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();
 
index f05f2279b35ef157dcecd1ffa842ed94a3882d0a..7fb80ca138abe6d68f97eb1e7506d7fd22c1080b 100644 (file)
@@ -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();
 
index 8b38d9f679581e0646010d4ff100824365123e05..9066c30853bc8bfd682d69c3e2d06a34551febb2 100644 (file)
@@ -159,6 +159,7 @@ static int run(int argc, char *argv[]) {
         char **i;
         int r;
 
+        log_show_color(true);
         log_parse_environment();
         log_open();
 
index 7f9bb49e0c900a2267794902c20903916acdcfd0..22de7350fe7f18abc2f5b3b0b4d7a315b9f06f19 100644 (file)
@@ -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();
 
index 60551ec22585499d5f1992d4d79305cfca6befca..4b370d700d51b7cb400bf23cc7db02294519a0bf 100644 (file)
@@ -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();
 
index 9900bd2e863fa73ad607e52abbaa974b0cc7e1be..c28f3b6d801375f3a224593937fe1cee7a6e9653 100644 (file)
@@ -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();
 
index 00489098eeec948d7d38c0c4e81e759766d6a5c7..3479535ba7fa52361d700cf75c121678b04a45e7 100644 (file)
@@ -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();
 
index c8b195d9a6c0968c32856d7973af5505cd7e950e..9fb51521109ba81fb28f9c780caa9f0c2d6929ae 100644 (file)
@@ -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();
 
index 47fd9e874dab7f5f57492ae5fc7f58d9a04d333a..d96c8195a28a0611b43b649fdc10e629fccb4414 100644 (file)
@@ -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();
 
index 342ac56d90437e022179ab04ab9686c607b54525..fcd5e169a9ed36cf56d2eac4311710e7bebffc48 100644 (file)
@@ -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();
 
index d98027a0ca5fdd63246f8498b960d1373743910d..51bad267d88011a66d4f8be1f402111cb17a1064 100644 (file)
@@ -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();
 
index b290095b0e95385c7acc15cf570f9bab45f9c46f..fcc4d4da61aec47da23efcdd2b82f566c9486a30 100644 (file)
@@ -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();
 
index 3881aaa42b577b43c4d484f448445fb7cce9ff50..4c51ad6a89ce729e395000a90d3b2db20656b07c 100644 (file)
@@ -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();
 
index fff5233b0cb8d6792523debd4dee0856c49e7734..0b518e16041d81c3881099962acb20db3bd8a38e 100644 (file)
@@ -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();
 
index 7b630a5714a558997d23f408ff78eeacd5204097..568b5fb04bee61c81e3810c7ab78137ca42d9dae 100644 (file)
@@ -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();
 
index 2c59f04eb5e700ffc2a0aa46d9a756fb933d9a06..5041745b3d06a754d2f044c71a4c2894d58da152 100644 (file)
@@ -956,6 +956,7 @@ static int run(int argc, char *argv[]) {
 
         int r;
 
+        log_show_color(true);
         log_parse_environment();
         log_open();
 
index 1d2fc713092bdc63ca50131a2d0e01ac68fd99f2..9637e00e6079845326ed02318218f499afec071f 100644 (file)
@@ -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();
 
index f200b28dfe52e359bc4f67675d48064f4500bf69..05c1552a8b7ff74bb36aa8b5c7d9e9c413133c61 100644 (file)
@@ -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();
 
index 406ca1df6616d95b02ba84e288b78ee921a6282b..e03f1796e73f38fd2ab69b8767cafae7cb466d0f 100644 (file)
@@ -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();