core/execute: suppress logs if LogLevelMax= is specified

Fixes #29532.
This commit is contained in:
Yu Watanabe 2023-10-11 22:58:49 +09:00 committed by Mike Yuan
parent fe2a6dce6c
commit 3bb424c837

View file

@ -4040,6 +4040,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();