]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
core: Parse log environment settings again after applying manager environment
authorDaan De Meyer <daan.j.demeyer@gmail.com>
Tue, 7 Sep 2021 15:13:56 +0000 (16:13 +0100)
committerLuca Boccassi <luca.boccassi@gmail.com>
Fri, 10 Sep 2021 13:03:55 +0000 (14:03 +0100)
Currently, SYSTEMD_LOG_LEVEL set in the ManagerEnvironment property in system.conf
or user.conf doesn't affect the manager's logging level. Parsing the logging environment
variables again after pushing the manager environment into the process environment
block makes sure any new environment changes also get taken into account for logging.

src/core/main.c

index 0914f92a2e0b09d4c5d308a67e831596f5860e16..7c915ccbcc5078106fc460118eb67cdee7a5e0ae 100644 (file)
@@ -2469,6 +2469,9 @@ static int parse_configuration(const struct rlimit *saved_rlimit_nofile,
         /* Push variables into the manager environment block */
         setenv_manager_environment();
 
+        /* Parse log environment variables again to take into account any new environment variables. */
+        log_parse_environment();
+
         return 0;
 }