]> granicus.if.org Git - icinga2/commitdiff
Fix log message for cli commands breaks the init script
authorMichael Friedrich <michael.friedrich@netways.de>
Thu, 12 Mar 2015 14:53:56 +0000 (15:53 +0100)
committerMichael Friedrich <michael.friedrich@netways.de>
Thu, 12 Mar 2015 14:57:52 +0000 (15:57 +0100)
fixes #8721

lib/base/application.cpp

index 4d72652b4f422171ea842399bad624e0eb0a7b7a..ca0c3387472b29b40f52935b25b6421af04b8239 100644 (file)
@@ -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();