diff options
author | rofl0r <rofl0r@users.noreply.github.com> | 2020-09-16 17:04:05 +0100 |
---|---|---|
committer | rofl0r <rofl0r@users.noreply.github.com> | 2020-09-16 21:00:04 +0100 |
commit | bad36cd9cd803f1bb6baaf96b76fac3f16f90161 (patch) | |
tree | 39492b1489189734f14a0348c8bac1ceb4d9b3d2 /src/main.c | |
parent | 683a3541968681c3753954dd724db58b24a1db33 (diff) |
move config reload message to reload_config()
move it to before disabling logging, so a message with the correct
timestamp is printed if logging was already enabled.
also add a message when loading finished, so one can see from the
timestamp how long it took.
note that this only works on a real config reload triggered by
SIGHUP/SIGUSR1, because on startup we don't know yet where to log to.
Diffstat (limited to 'src/main.c')
-rw-r--r-- | src/main.c | 3 |
1 files changed, 3 insertions, 0 deletions
@@ -257,6 +257,8 @@ int reload_config (int reload_logging) int ret; struct config_s *c_next = get_next_config(); + log_message (LOG_NOTICE, "Reloading config file"); + if (reload_logging) shutdown_logging (); ret = reload_config_file (config_file, c_next); @@ -269,6 +271,7 @@ int reload_config (int reload_logging) config = c_next; if (reload_logging) ret = setup_logging (); + log_message (LOG_NOTICE, "Reloading config file finished"); done: return ret; |