From 6d3db6f092a6478ad8e0518e573c44a004021d3e Mon Sep 17 00:00:00 2001
From: Luca Boccassi <bluca@debian.org>
Date: Wed, 8 Mar 2023 12:59:40 +0000
Subject: [PATCH] core: log message when reloading finishes

Reloading might be slow, especially when under memory pressure, and watchdogs
might be triggered. It is useful to have timestamped telemetry in the journal
to see how long a reload takes.

(cherry picked from commit af2fb2f250e664973d947554414749e9b94d68a1)

Conflict:code context adaptation and delete the print related to MANAGER_TIMESTAMP_UNITS_LOAD
Reference:https://github.com/systemd/systemd/commit/af2fb2f250e664973d947554414749e9b94d68a1
---
 src/core/main.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/src/core/main.c b/src/core/main.c
index 4317365..a36b13d 100644
--- a/src/core/main.c
+++ b/src/core/main.c
@@ -1934,7 +1934,7 @@ static int invoke_main_loop(
                         LogTarget saved_log_target;
                         int saved_log_level;
 
-                        log_info("Reloading.");
+                        log_info("Reloading...");
 
                         /* First, save any overridden log level/target, then parse the configuration file, which might
                          * change the log level to new settings. */
@@ -1959,6 +1959,8 @@ static int invoke_main_loop(
                         if (r < 0)
                                 /* Reloading failed before the point of no return. Let's continue running as if nothing happened. */
                                 m->objective = MANAGER_OK;
+                        else
+                                log_info("Reloading finished.");
 
                         break;
                 }
-- 
2.33.0

