From 7aecbf2ef78d89949ed0cc78324d6e044b1cf93a Mon Sep 17 00:00:00 2001 From: hyunho Date: Wed, 8 Jul 2020 17:23:39 +0900 Subject: [PATCH] Add file logs for launch/dead events Change-Id: Idc5aae1f55d3db9b282f97cf527afdd182a9a23f Signed-off-by: hyunho --- watch-holder/src/watch_holder.cc | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/watch-holder/src/watch_holder.cc b/watch-holder/src/watch_holder.cc index ff7afac3..887066e2 100644 --- a/watch-holder/src/watch_holder.cc +++ b/watch-holder/src/watch_holder.cc @@ -19,6 +19,7 @@ #include #include #include +#include #include "watch_holder.hh" #include "bundle_cpp.h" @@ -144,6 +145,8 @@ int WatchHolder::OnDeadSignal(const char *endpoint, aul_app_com_result_e e, string pid = data.GetString(AUL_K_PID); string is_faulted = data.GetString(AUL_K_IS_FAULT); LOGW("Watch(%s)(%s) DEAD", appid.c_str(), pid.c_str()); + aul_widget_write_log(LOG_TAG, "[%s:%d] %s [%s]", + __FUNCTION__, __LINE__, appid.c_str(), pid.c_str()); list>::iterator it; for (it = holder->stack_.begin(); it != holder->stack_.end(); ++it) { if ((*it)->GetAppId() == appid && @@ -152,6 +155,8 @@ int WatchHolder::OnDeadSignal(const char *endpoint, aul_app_com_result_e e, holder->OnDead(**it); holder->stack_.erase(it); LOGW("REMOVE DEAD WATCH (%s)(%s)", appid.c_str(), pid.c_str()); + aul_widget_write_log(LOG_TAG, "[%s:%d] %s [%s], remove dead done", + __FUNCTION__, __LINE__, appid.c_str(), pid.c_str()); break; } } @@ -180,6 +185,8 @@ int WatchHolder::OnLaunchSignal(const char *endpoint, } holder->OnLaunched(*holder->GetCurrent()); LOGI("LAUNCH DONE (%s)", viewer_appid.c_str()); + aul_widget_write_log(LOG_TAG, "[%s:%d] %s, launch done", + __FUNCTION__, __LINE__, watch_appid.c_str()); return 0; } -- 2.34.1