Skip to content

Commit 1a04395

Browse files
committed
Enable log colors for most of tools in /usr/bin
When emitting the calendarspec warning we want to see some color. Follow-up for 04220fd. 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.
1 parent 37b8d2f commit 1a04395

File tree

26 files changed

+26
-0
lines changed

26 files changed

+26
-0
lines changed

src/activate/activate.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -474,6 +474,7 @@ int main(int argc, char **argv, char **envp) {
474474
int r, n;
475475
int epoll_fd = -1;
476476

477+
log_show_color(true);
477478
log_parse_environment();
478479
log_open();
479480

src/analyze/analyze.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2104,6 +2104,7 @@ static int run(int argc, char *argv[]) {
21042104
setlocale(LC_ALL, "");
21052105
setlocale(LC_NUMERIC, "C"); /* we want to format/parse floats in C style */
21062106

2107+
log_show_color(true);
21072108
log_parse_environment();
21082109
log_open();
21092110

src/ask-password/ask-password.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -158,6 +158,7 @@ static int run(int argc, char *argv[]) {
158158
char **p;
159159
int r;
160160

161+
log_show_color(true);
161162
log_parse_environment();
162163
log_open();
163164

src/busctl/busctl.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2508,6 +2508,7 @@ static int busctl_main(int argc, char *argv[]) {
25082508
static int run(int argc, char *argv[]) {
25092509
int r;
25102510

2511+
log_show_color(true);
25112512
log_parse_environment();
25122513
log_open();
25132514

src/cgls/cgls.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -165,6 +165,7 @@ static void show_cg_info(const char *controller, const char *path) {
165165
static int run(int argc, char *argv[]) {
166166
int r, output_flags;
167167

168+
log_show_color(true);
168169
log_parse_environment();
169170
log_open();
170171

src/cgtop/cgtop.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -909,6 +909,7 @@ static int run(int argc, char *argv[]) {
909909
CGroupMask mask;
910910
int r;
911911

912+
log_show_color(true);
912913
log_parse_environment();
913914
log_open();
914915

src/coredump/coredumpctl.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1069,6 +1069,7 @@ static int run(int argc, char *argv[]) {
10691069
int r, units_active;
10701070

10711071
setlocale(LC_ALL, "");
1072+
log_show_color(true);
10721073
log_parse_environment();
10731074
log_open();
10741075

src/delta/delta.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -639,6 +639,7 @@ static int parse_argv(int argc, char *argv[]) {
639639
static int run(int argc, char *argv[]) {
640640
int r, k, n_found = 0;
641641

642+
log_show_color(true);
642643
log_parse_environment();
643644
log_open();
644645

src/detect-virt/detect-virt.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -128,6 +128,7 @@ static int run(int argc, char *argv[]) {
128128
* to detect whether we are being run in a virtualized
129129
* environment or not */
130130

131+
log_show_color(true);
131132
log_parse_environment();
132133
log_open();
133134

src/escape/escape.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -159,6 +159,7 @@ static int run(int argc, char *argv[]) {
159159
char **i;
160160
int r;
161161

162+
log_show_color(true);
162163
log_parse_environment();
163164
log_open();
164165

0 commit comments

Comments
 (0)