mirror of
https://github.com/systemd/systemd
synced 2024-10-15 04:24:19 +00:00
Merge pull request #23931 from yuwata/systemctl-color-log
systemctl: colorize logs
This commit is contained in:
commit
db835e5d0e
|
@ -377,9 +377,7 @@ int need_daemon_reload(sd_bus *bus, const char *unit) {
|
||||||
void warn_unit_file_changed(const char *unit) {
|
void warn_unit_file_changed(const char *unit) {
|
||||||
assert(unit);
|
assert(unit);
|
||||||
|
|
||||||
log_warning("%sWarning:%s The unit file, source configuration file or drop-ins of %s changed on disk. Run 'systemctl%s daemon-reload' to reload units.",
|
log_warning("Warning: The unit file, source configuration file or drop-ins of %s changed on disk. Run 'systemctl%s daemon-reload' to reload units.",
|
||||||
ansi_highlight_red(),
|
|
||||||
ansi_normal(),
|
|
||||||
unit,
|
unit,
|
||||||
arg_scope == LOOKUP_SCOPE_SYSTEM ? "" : " --user");
|
arg_scope == LOOKUP_SCOPE_SYSTEM ? "" : " --user");
|
||||||
}
|
}
|
||||||
|
|
|
@ -1113,8 +1113,7 @@ static int run(int argc, char *argv[]) {
|
||||||
int r;
|
int r;
|
||||||
|
|
||||||
setlocale(LC_ALL, "");
|
setlocale(LC_ALL, "");
|
||||||
log_parse_environment();
|
log_setup();
|
||||||
log_open();
|
|
||||||
|
|
||||||
/* The journal merging logic potentially needs a lot of fds. */
|
/* The journal merging logic potentially needs a lot of fds. */
|
||||||
(void) rlimit_nofile_bump(HIGH_RLIMIT_NOFILE);
|
(void) rlimit_nofile_bump(HIGH_RLIMIT_NOFILE);
|
||||||
|
|
Loading…
Reference in a new issue