Print logs related to app and loader executions
authorHwankyu Jhun <h.jhun@samsung.com>
Fri, 23 Feb 2024 07:26:59 +0000 (16:26 +0900)
committerHwankyu Jhun <h.jhun@samsung.com>
Mon, 26 Feb 2024 06:52:40 +0000 (15:52 +0900)
Before calling execv(), the process will be printed for debugging.

Change-Id: Id9c0b8c8f0ff87f4aa4c9d75db04b568d4beed25
Signed-off-by: Hwankyu Jhun <h.jhun@samsung.com>
src/app-defined-loader/app-defined-loader.cc
src/launchpad-loader/launchpad_loader.cc
src/launchpad-process-pool/app_executor.cc
src/launchpad-process-pool/loader_executor.cc

index 4ff94d48ce9fbdd8250f3b29ddb7ffb8bdde3f83..3e0badc4fa0c909affc3d14eddd6053b8d5980f8 100644 (file)
@@ -187,7 +187,7 @@ class AppDefinedLoader {
       SECURE_LOGE("access() failed for file: \"%s\", error: %d (%s)",
           argv_[0], errno, strerror_r(errno, err_str, sizeof(err_str)));
     } else {
-      SECURE_LOGD("[candidate] Exec application (%s)", argv_[0]);
+      SECURE_LOGW("[candidate] Exec application (%s)", argv_[0]);
       if (!libdir.empty())
         setenv("LD_LIBRARY_PATH", libdir.c_str(), 1);
       unsetenv("AUL_LOADER_INIT");
index d3cf7b4a5fd374933d8411e6135dfbefcb84dfa6..032a2bbd5caa886f3cc0012b358f6a27ba9e421d 100644 (file)
@@ -268,7 +268,7 @@ int LaunchpadLoader::DoExec(int argc, char** argv, const std::string& lib_dir) {
   if (access(argv[0], F_OK | R_OK) != 0)
     SECURE_LOGE("access() is failed. path(%s), errno(%d)", argv[0], errno);
 
-  SECURE_LOGD("Execute application. path(%s)", argv[0]);
+  SECURE_LOGW("Execute application. path(%s)", argv[0]);
   if (!lib_dir.empty())
     setenv("LD_LIBRARY_PATH", lib_dir.c_str(), 1);
 
index c47d3cfb4b4d6cf47959ec689ea773d4d560dcf9..819b50a2f66752a47855210b5af4ae805210f19d 100644 (file)
@@ -152,6 +152,7 @@ void AppExecutor::OnExecution() {
     setenv("LD_LIBRARY_PATH", lib_dir.c_str(), 1);
 
   Util::CloseAllFds();
+  SECURE_LOGE("Execute application(%s)", app_argv[LoaderArg::Path]);
   if (execv(app_argv[LoaderArg::Path], app_argv) < 0) {
     char err_buf[1024];
     fprintf(stderr, "Failed to execute a file. path: %s, errno: %d(%s)\n",
index 1a23a670499b814dacba33719db73438bf55c9aa..37b819804d298ebdf413097839d5d94fca9d090d 100644 (file)
@@ -104,6 +104,7 @@ void LoaderExecutor::OnExecution() {
   Util::CloseAllFds();
   Stdio::Setup();
 
+  SECURE_LOGE("Execute loader(%s)", loader_argv[LoaderArg::Path]);
   if (execv(loader_argv[LoaderArg::Path], loader_argv.data()) < 0) {
     char err_buf[1024];
     fprintf(stderr, "Failed to execute a file. path: %s, errno: %d:%s\n",