From: Yu Watanabe Date: Wed, 11 Oct 2023 13:58:49 +0000 (+0900) Subject: core/execute: suppress logs if LogLevelMax= is specified X-Git-Tag: v255-rc1~269 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3bb424c837eca2d8041f9e000a268a6a2b582981;p=thirdparty%2Fsystemd.git core/execute: suppress logs if LogLevelMax= is specified Fixes #29532. --- diff --git a/src/core/execute.c b/src/core/execute.c index 7cf6601ee7e..ffbe0832f4e 100644 --- a/src/core/execute.c +++ b/src/core/execute.c @@ -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();