mirror of
https://github.com/systemd/systemd.git
synced 2025-01-09 01:18:19 +03:00
log: don't downgrade log level in non-PID 1 if "quiet" is passed on kernel cmdline
"debug" should apply to all tools, but "quiet" only to PID1.
This commit is contained in:
parent
8f294b45cb
commit
d7b15e0a01
Notes:
Zbigniew Jędrzejewski-Szmek
2014-06-21 10:24:36 -04:00
Backport: fix
@ -412,11 +412,16 @@ static int parse_proc_cmdline_item(const char *key, const char *value) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
} else if (streq(key, "quiet") && !value) {
|
} else if (streq(key, "quiet") && !value) {
|
||||||
|
|
||||||
|
log_set_max_level(LOG_NOTICE);
|
||||||
|
|
||||||
if (arg_show_status == _SHOW_STATUS_UNSET)
|
if (arg_show_status == _SHOW_STATUS_UNSET)
|
||||||
arg_show_status = SHOW_STATUS_AUTO;
|
arg_show_status = SHOW_STATUS_AUTO;
|
||||||
|
|
||||||
} else if (streq(key, "debug") && !value) {
|
} else if (streq(key, "debug") && !value) {
|
||||||
|
|
||||||
log_set_max_level(LOG_DEBUG);
|
log_set_max_level(LOG_DEBUG);
|
||||||
|
|
||||||
if (detect_container(NULL) > 0)
|
if (detect_container(NULL) > 0)
|
||||||
log_set_target(LOG_TARGET_CONSOLE);
|
log_set_target(LOG_TARGET_CONSOLE);
|
||||||
|
|
||||||
|
@ -878,9 +878,6 @@ void log_parse_environment(void) {
|
|||||||
if (l == 5 && startswith(w, "debug")) {
|
if (l == 5 && startswith(w, "debug")) {
|
||||||
log_set_max_level(LOG_DEBUG);
|
log_set_max_level(LOG_DEBUG);
|
||||||
break;
|
break;
|
||||||
} else if (l == 5 && startswith(w, "quiet")) {
|
|
||||||
log_set_max_level(LOG_WARNING);
|
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user