1
1
mirror of https://github.com/systemd/systemd-stable.git synced 2025-02-01 05:47:04 +03:00

core/execute: suppress logs if LogLevelMax= is specified

Fixes #29532.

(cherry picked from commit 3bb424c837eca2d8041f9e000a268a6a2b582981)
(cherry picked from commit 053e120636f031e0b7d185b4136ad3e10c13d8de)
This commit is contained in:
Yu Watanabe 2023-10-11 22:58:49 +09:00 committed by Luca Boccassi
parent f7022ac612
commit ca1a43c56b

View File

@ -4322,6 +4322,8 @@ static int exec_child(
log_forget_fds();
log_set_open_when_needed(true);
log_settle_target();
if (context->log_level_max >= 0)
log_set_max_level(context->log_level_max);
/* In case anything used libc syslog(), close this here, too */
closelog();