From 31e5394fe9b70ee2be1a5c962661d31eed1c98d0 Mon Sep 17 00:00:00 2001 From: "Alexander A. Klimov" Date: Tue, 16 Jul 2019 11:43:47 +0200 Subject: [PATCH] Fix style refs #5230 --- lib/base/application.cpp | 3 ++- lib/cli/daemoncommand.cpp | 39 ++++++++++++++++++++++++++------------- 2 files changed, 28 insertions(+), 14 deletions(-) diff --git a/lib/base/application.cpp b/lib/base/application.cpp index 7011ddc07..4707f0d23 100644 --- a/lib/base/application.cpp +++ b/lib/base/application.cpp @@ -305,7 +305,8 @@ void Application::RunEventLoop() m_ReloadProcess = StartReloadProcess(); } #else /* _WIN32 */ - Log(LogNotice, "Application") << "Got reload command, forwarding to umbrella process (PID " << m_UmbrellaProcess << ")"; + Log(LogNotice, "Application") + << "Got reload command, forwarding to umbrella process (PID " << m_UmbrellaProcess << ")"; (void)kill(m_UmbrellaProcess, SIGHUP); #endif /* _WIN32 */ diff --git a/lib/cli/daemoncommand.cpp b/lib/cli/daemoncommand.cpp index cdc105dc6..8091c403e 100644 --- a/lib/cli/daemoncommand.cpp +++ b/lib/cli/daemoncommand.cpp @@ -208,17 +208,20 @@ int RunWorker(const std::vector& configs) return EXIT_FAILURE; #ifndef _WIN32 - Log(LogNotice, "cli") << "Notifying umbrella process (PID " << l_UmbrellaPid << ") about the config loading success"; + Log(LogNotice, "cli") + << "Notifying umbrella process (PID " << l_UmbrellaPid << ") about the config loading success"; (void)kill(l_UmbrellaPid, SIGUSR2); - Log(LogNotice, "cli") << "Waiting for the umbrella process to let us doing the actual work"; + Log(LogNotice, "cli") + << "Waiting for the umbrella process to let us doing the actual work"; while (!l_AllowedToWork.load()) { Utility::Sleep(0.2); } - Log(LogNotice, "cli") << "The umbrella process let us continuing"; + Log(LogNotice, "cli") + << "The umbrella process let us continuing"; #endif /* _WIN32 */ /* restore the previous program state */ @@ -399,7 +402,8 @@ static void NotifyWatchdog() */ static pid_t StartUnixWorker(const std::vector& configs) { - Log(LogNotice, "cli") << "Spawning seemless worker process doing the actual work"; + Log(LogNotice, "cli") + << "Spawning seemless worker process doing the actual work"; try { Application::UninitializeBase(); @@ -466,7 +470,8 @@ static pid_t StartUnixWorker(const std::vector& configs) l_CurrentlyStartingUnixWorkerPid.store(pid); (void)sigprocmask(SIG_UNBLOCK, &l_UnixWorkerSignals, nullptr); - Log(LogNotice, "cli") << "Spawned worker process (PID " << pid << "), waiting for it to load its config"; + Log(LogNotice, "cli") + << "Spawned worker process (PID " << pid << "), waiting for it to load its config"; // Wait for the newly spawned process to either load its config or fail. for (;;) { @@ -476,10 +481,12 @@ static pid_t StartUnixWorker(const std::vector& configs) switch (l_CurrentlyStartingUnixWorkerState.load()) { case UnixWorkerState::LoadedConfig: - Log(LogNotice, "cli") << "Worker process successfully loaded its config"; + Log(LogNotice, "cli") + << "Worker process successfully loaded its config"; break; case UnixWorkerState::Failed: - Log(LogNotice, "cli") << "Worker process couldn't load its config"; + Log(LogNotice, "cli") + << "Worker process couldn't load its config"; while (waitpid(pid, nullptr, 0) == -1 && errno == EINTR) { #ifdef HAVE_SYSTEMD @@ -659,7 +666,8 @@ int DaemonCommand::Run(const po::variables_map& vm, const std::vector 0) { - Log(LogNotice, "cli") << "Seemless worker (PID " << currentWorker << ") stopped, stopping as well"; + Log(LogNotice, "cli") + << "Seemless worker (PID " << currentWorker << ") stopped, stopping as well"; #ifdef HAVE_SYSTEMD if (!notifiedTermination) {