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.
This commit is contained in:
Zbigniew Jędrzejewski-Szmek
2019-04-26 12:28:25 +02:00
parent 37b8d2f699
commit 1a04395959
26 changed files with 26 additions and 0 deletions

View 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();

View 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();

View 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();

View 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();

View 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();

View 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();

View 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();

View 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();

View 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();

View 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();

View 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();

View 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();

View 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();

View 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();

View 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();

View 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();

View 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();

View 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();

View 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();

View 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();

View 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();

View 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();

View File

@@ -956,6 +956,7 @@ static int run(int argc, char *argv[]) {
int r;
log_show_color(true);
log_parse_environment();
log_open();

View 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();

View 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();

View 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();