]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
core/execute: suppress logs if LogLevelMax= is specified
authorYu Watanabe <watanabe.yu+github@gmail.com>
Wed, 11 Oct 2023 13:58:49 +0000 (22:58 +0900)
committerMike Yuan <me@yhndnzj.com>
Wed, 11 Oct 2023 18:35:57 +0000 (02:35 +0800)
Fixes #29532.

src/core/execute.c

index 7cf6601ee7eb8564eddb8f2b2966b18eff1f5c16..ffbe0832f4e7ae6797365781c08dbef8317ec2e7 100644 (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();