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.
This commit is contained in:
Luca Boccassi
2023-03-08 18:41:07 +01:00
committed by Zbigniew Jędrzejewski-Szmek
parent 0744ed0f26
commit af2fb2f250
+4 -1
View File
@@ -1973,7 +1973,7 @@ static int invoke_main_loop(
manager_send_reloading(m);
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. */
@@ -1998,6 +1998,9 @@ static int invoke_main_loop(
/* 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 in " USEC_FMT " ms.",
usec_sub_unsigned(now(CLOCK_MONOTONIC), m->timestamps[MANAGER_TIMESTAMP_UNITS_LOAD].monotonic) / USEC_PER_MSEC);
continue;
}