From: Michael Friedrich Date: Thu, 12 Mar 2015 14:53:56 +0000 (+0100) Subject: Fix log message for cli commands breaks the init script X-Git-Tag: v2.3.2~1 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=6a6662644eb83129ec5f9a28dd52a2a353ed37ff;p=icinga2 Fix log message for cli commands breaks the init script fixes #8721 --- diff --git a/lib/base/application.cpp b/lib/base/application.cpp index 4d72652b4..ca0c33874 100644 --- a/lib/base/application.cpp +++ b/lib/base/application.cpp @@ -106,12 +106,6 @@ Application::~Application(void) void Application::Exit(int rc) { - if (rc) - Log(LogCritical, "Application") - << "Shutting down after a fatal error; exit code: " << rc; - else - Log(LogInformation, "Application", "Shutting down..."); - std::cout.flush(); BOOST_FOREACH(const Logger::Ptr& logger, Logger::GetLoggers()) { @@ -315,6 +309,8 @@ mainloop: goto mainloop; } + Log(LogInformation, "Application", "Shutting down..."); + DynamicObject::StopObjects(); Application::GetInstance()->OnShutdown();