From 3628cf4805fd8c5528ebe3991be5a8383f1d00d9 Mon Sep 17 00:00:00 2001 From: Thomas Haller Date: Fri, 24 Jun 2022 09:39:41 +0200 Subject: core: log boot-id when NetworkManager starts In a logfile, the "is starting" message is an interesting point that indicates when NetworkManager is starting. Include also the boot-id in the log, so that we can know whether this was a restart from the same boot. Also drop the "for the first time" part. [1656057181.8920] NetworkManager (version 1.39.7) is starting... (after a restart, asserts:10000, boot:486b1052-4bf8-48af-8f15-f3e85c3321f6) --- src/core/main.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/core/main.c b/src/core/main.c index 1a9c3a652d..1cd3788074 100644 --- a/src/core/main.c +++ b/src/core/main.c @@ -417,9 +417,10 @@ main(int argc, char *argv[]) } nm_log_info(LOGD_CORE, - "NetworkManager (version " NM_DIST_VERSION ") is starting... (%s%s)", - nm_config_get_first_start(config) ? "for the first time" : "after a restart", - NM_MORE_ASSERTS != 0 ? ", asserts:" G_STRINGIFY(NM_MORE_ASSERTS) : ""); + "NetworkManager (version " NM_DIST_VERSION ") is starting... (%s%sboot:%s)", + nm_config_get_first_start(config) ? "" : "after a restart, ", + NM_MORE_ASSERTS != 0 ? "asserts:" G_STRINGIFY(NM_MORE_ASSERTS) ", " : "", + nm_utils_boot_id_str()); nm_log_info(LOGD_CORE, "Read config: %s", -- cgit v1.2.1