From: Yu Watanabe Date: Mon, 13 Oct 2025 01:35:22 +0000 (+0900) Subject: coredump: allow to control log level and so on via command line X-Git-Tag: v259-rc1~190^2~4 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d7755c9caf55da2df3969709840022619fe1d20b;p=thirdparty%2Fsystemd.git coredump: allow to control log level and so on via command line --- diff --git a/src/coredump/coredump.c b/src/coredump/coredump.c index c29976e281e..6a758ac2770 100644 --- a/src/coredump/coredump.c +++ b/src/coredump/coredump.c @@ -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);