]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
coredump: allow to control log level and so on via command line
authorYu Watanabe <watanabe.yu+github@gmail.com>
Mon, 13 Oct 2025 01:35:22 +0000 (10:35 +0900)
committerYu Watanabe <watanabe.yu+github@gmail.com>
Tue, 28 Oct 2025 05:31:41 +0000 (14:31 +0900)
src/coredump/coredump.c

index c29976e281e24479792274618b5382879c4cbcca..6a758ac2770460b6cfb0d84d30434e4d59231499 100644 (file)
@@ -18,11 +18,12 @@ static int run(int argc, char *argv[]) {
         if (streq_ptr(argv[1], "--backtrace"))
                 return coredump_backtrace(argc, argv);
 
-        /* First, log to a safe place, since we don't know what crashed and it might
-         * be journald which we'd rather not log to then. */
+        /* First, log to a safe place, since we don't know what crashed and it might be journald which we'd
+         * rather not log to then. */
+        log_parse_environment();
         log_set_target_and_open(LOG_TARGET_KMSG);
 
-        /* Make sure we never enter a loop */
+        /* Make sure we never enter a loop. */
         (void) set_dumpable(SUID_DUMP_DISABLE);
 
         r = sd_listen_fds(false);