[Application] Adding debug logs 27/146627/4
authorMichal Bistyga <m.bistyga@samsung.com>
Tue, 29 Aug 2017 15:20:39 +0000 (17:20 +0200)
committerMichal Bistyga <m.bistyga@samsung.com>
Wed, 6 Sep 2017 09:35:22 +0000 (11:35 +0200)
Change-Id: I9fca94f5bda30b39bfff700f8cd37c5abe81d9f3
Signed-off-by: Michal Bistyga <m.bistyga@samsung.com>
src/application/application_manager.cc

index 0d8ed503ef93f9be943b46e0d48c2aab5fe69c65..b900c785bcec66fb45c3bc4d41602ade82c3d72f 100755 (executable)
@@ -599,8 +599,10 @@ void ApplicationManager::LaunchAppControl(const picojson::value& args) {
     int ret = 0;
 
     while (retry < retry_count) {
-      ret = app_control_send_launch_request(app_control_ptr.get(), callback, user_data);
+      LoggerD("Calling launch request. Attempt number: %d", retry);
 
+      ret = app_control_send_launch_request(app_control_ptr.get(), callback, user_data);
+      LoggerD("App control launch request returned: %d, %s", ret, get_error_message(ret));
       if (APP_CONTROL_ERROR_NONE == ret) {
         break;
       }
@@ -609,8 +611,6 @@ void ApplicationManager::LaunchAppControl(const picojson::value& args) {
       struct timespec sleep_time = { 0, 300L * 1000L * 1000L };
       nanosleep(&sleep_time, nullptr);
       ++retry;
-
-      LoggerD("Retry launch request: %d", retry);
     }
 
     if (APP_CONTROL_ERROR_NONE != ret) {
@@ -640,11 +640,12 @@ void ApplicationManager::LaunchAppControl(const picojson::value& args) {
           return;
       }
     }
-
     ReportSuccess(response->get<picojson::object>());
   };
 
   auto launch_response = [this](const std::shared_ptr<picojson::value>& response) -> void {
+    LoggerD("Entered launch_response");
+
     Instance::PostMessage(&this->instance_, response->serialize().c_str());
   };