mirror of
https://github.com/systemd/systemd.git
synced 2025-01-26 14:04:03 +03:00
log: reopen console so that we have logging on shutdown
This commit is contained in:
parent
dc8e15c206
commit
dcdf86bbb0
@ -212,6 +212,9 @@ int log_open(void) {
|
||||
}
|
||||
|
||||
log_close_syslog();
|
||||
|
||||
/* Get the real /dev/console if we are PID=1, hence reopen */
|
||||
log_close_console();
|
||||
return log_open_console();
|
||||
}
|
||||
|
||||
@ -519,10 +522,9 @@ void log_parse_environment(void) {
|
||||
if (log_show_color_from_string(e) < 0)
|
||||
log_warning("Failed to parse bool %s. Ignoring.", e);
|
||||
|
||||
if ((e = getenv("SYSTEMD_LOG_LOCATION"))) {
|
||||
if ((e = getenv("SYSTEMD_LOG_LOCATION")))
|
||||
if (log_show_location_from_string(e) < 0)
|
||||
log_warning("Failed to parse bool %s. Ignoring.", e);
|
||||
}
|
||||
}
|
||||
|
||||
LogTarget log_get_target(void) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user