diff --git a/common/appspawn_server.c b/common/appspawn_server.c index c59f93fa3453db3570049616fad8ff9213b66485..0eb3107cfcdc5c36a23f3d7ec3bcd5e7dd22f591 100644 --- a/common/appspawn_server.c +++ b/common/appspawn_server.c @@ -41,7 +41,7 @@ static void NotifyResToParent(struct AppSpawnContent *content, AppSpawnClient *c void ProcessExit(int code) { - APPSPAWN_LOGI("App exit code: %{public}d", code); + APPSPAWN_LOGI("ExitCode:%{public}d", code); #ifdef OHOS_LITE _exit(0x7f); // 0x7f user exit #else diff --git a/modules/common/appspawn_silk.c b/modules/common/appspawn_silk.c index 25b8d691e02c0ea1640b88afc38952636d781b65..37478b99a498c2f18321a84902020276a94614cb 100644 --- a/modules/common/appspawn_silk.c +++ b/modules/common/appspawn_silk.c @@ -115,9 +115,9 @@ static void FreeAllSilkConfig(void) void LoadSilkLibrary(const char *packageName) { APPSPAWN_CHECK(g_silkConfig.configItems != NULL, return, - "Load silk library failed for configItems is NULL"); + "ConfigItems is NULL"); APPSPAWN_CHECK(packageName != NULL, FreeAllSilkConfig(); return, - "Load silk library failed for packageName is NULL"); + "PackageName is NULL"); char **appName = NULL; void *handle = NULL; for (int i = 0; i < g_silkConfig.configCursor; i++) { diff --git a/modules/sandbox/sandbox_shared_mount.cpp b/modules/sandbox/sandbox_shared_mount.cpp index a5e11c043f8f0228a48a97a7db8ff509e417306f..58f2635c3fef5df9410b5b62b39d737786bd6085 100644 --- a/modules/sandbox/sandbox_shared_mount.cpp +++ b/modules/sandbox/sandbox_shared_mount.cpp @@ -227,7 +227,7 @@ static int MountWithFileMgr(const AppSpawningCtx *property, const AppDacInfo *in // Check whether the directory is a shared mount point if (SetSandboxPathShared(storageUserPath)) { - APPSPAWN_LOGI("shared mountpoint is exist"); + APPSPAWN_LOGV("shared mountpoint is exist"); return 0; } @@ -274,7 +274,7 @@ static int MountWithOther(const AppSpawningCtx *property, const AppDacInfo *info // Check whether the directory is a shared mount point if (SetSandboxPathShared(storageUserPath)) { - APPSPAWN_LOGI("shared mountpoint is exist"); + APPSPAWN_LOGV("shared mountpoint is exist"); return 0; } @@ -341,7 +341,7 @@ static int MountSharedMapItem(const AppSpawningCtx *property, const AppDacInfo * // Check whether the directory is a shared mount point if (SetSandboxPathShared(sandboxPath)) { - APPSPAWN_LOGI("shared mountpoint is exist"); + APPSPAWN_LOGV("shared mountpoint is exist"); return 0; } diff --git a/modules/sandbox/sandbox_utils.cpp b/modules/sandbox/sandbox_utils.cpp index 605eceb950de80fa6ae161e7bdda0c076b98b437..6f30d7b423913aeeca055716796387a7a2f25153 100644 --- a/modules/sandbox/sandbox_utils.cpp +++ b/modules/sandbox/sandbox_utils.cpp @@ -1356,7 +1356,7 @@ int32_t SandboxUtils::MountAllHsp(const AppSpawningCtx *appProperty, std::string APPSPAWN_CHECK(bundles.is_array() && modules.is_array() && versions.is_array() && bundles.size() == modules.size() && bundles.size() == versions.size(), return -1, "MountAllHsp: value is not arrary or sizes are not same"); - APPSPAWN_LOGI("MountAllHsp: app = %{public}s, cnt = %{public}lu", + APPSPAWN_LOGV("MountAllHsp: app = %{public}s, cnt = %{public}lu", GetBundleName(appProperty), static_cast(bundles.size())); for (uint32_t i = 0; i < bundles.size(); i++) { // elements in json arrary can be different type diff --git a/standard/appspawn_appmgr.c b/standard/appspawn_appmgr.c index 18740ea95c796a0737a7805c7bfaba1e6bb74b13..7785eca2a145959e381f949d143d8ba3670c051c 100644 --- a/standard/appspawn_appmgr.c +++ b/standard/appspawn_appmgr.c @@ -390,8 +390,8 @@ static int DumpAppQueue(ListNode *node, void *data) { AppSpawnedProcess *appInfo = ListEntry(node, AppSpawnedProcess, node); uint64_t diff = DiffTime(&appInfo->spawnStart, &appInfo->spawnEnd); - APPSPAWN_DUMP("App info uid: %{public}u pid: %{public}x", appInfo->uid, appInfo->pid); - APPSPAWN_DUMP("App info name: %{public}s exitStatus: 0x%{public}x spawn time: %{public}" PRIu64 " us ", + APPSPAWN_DUMP("AppInfoUid:%{public}u pid:%{public}x", appInfo->uid, appInfo->pid); + APPSPAWN_DUMP("AppInfoName:%{public}s exitStatus:0x%{public}x spawn time:%{public}" PRIu64 " us ", appInfo->name, appInfo->exitStatus, diff); return 0; } diff --git a/standard/appspawn_kickdog.c b/standard/appspawn_kickdog.c index 8d2707498303b22a4544a88c3c30b23119d5deb8..04a7db138c948d06e14b057fb46df161a47d273e 100644 --- a/standard/appspawn_kickdog.c +++ b/standard/appspawn_kickdog.c @@ -73,8 +73,8 @@ static void DealSpawnWatchdog(AppSpawnContent *content, bool isOpen) if (isOpen) { content->wdgOpened = (result != -1); } - APPSPAWN_LOGI("procFile: %{public}s procContent: %{public}s %{public}s %{public}s watchdog end, result:%{public}d", - procFile, procContent, (content->mode == MODE_FOR_NWEB_SPAWN) ? + APPSPAWN_LOGI("%{public}s %{public}s %{public}s watchdog end,result:%{public}d", + content->isLinux ? "Linux" : "Hm", (content->mode == MODE_FOR_NWEB_SPAWN) ? "Nwebspawn" : "Appspawn", isOpen ? "enable" : "kick", result); } diff --git a/standard/appspawn_msgmgr.c b/standard/appspawn_msgmgr.c index 588693b7379ed0d025396a7f990cd8cd3143ee32..2e844d93a49d9f09810b90df8b0fae5b9ed63a07 100644 --- a/standard/appspawn_msgmgr.c +++ b/standard/appspawn_msgmgr.c @@ -365,7 +365,7 @@ static inline void DumpMsgExtInfo(const AppSpawnTlv *tlv) APPSPAWN_LOGV("App extend info name: %{public}s len: %{public}u value: '%{public}s'", tlvExt->tlvName, tlvExt->dataLen, (char *)(tlvExt + 1)); } else { - APPSPAWN_DUMP("App extend info name: %{public}s len: %{public}u", tlvExt->tlvName, tlvExt->dataLen); + APPSPAWN_DUMP("AppExtendName:%{public}s len:%{public}u", tlvExt->tlvName, tlvExt->dataLen); } } @@ -376,7 +376,7 @@ void DumpAppSpawnMsg(const AppSpawnMsgNode *message) message->msgHeader.msgId, message->msgHeader.msgLen, message->tlvCount, message->msgHeader.processName); AppSpawnMsgFlags *msgFlags = (AppSpawnMsgFlags *)GetAppSpawnMsgInfo(message, TLV_MSG_FLAGS); - APPSPAWN_ONLY_EXPER(msgFlags != NULL, DumpMsgFlags(message->msgHeader.processName, "App flags", msgFlags)); + APPSPAWN_ONLY_EXPER(msgFlags != NULL, DumpMsgFlags(message->msgHeader.processName, "App", msgFlags)); msgFlags = (AppSpawnMsgFlags *)GetAppSpawnMsgInfo(message, TLV_PERMISSION); APPSPAWN_ONLY_EXPER(msgFlags != NULL, DumpMsgFlags(message->msgHeader.processName, "App permission bits", msgFlags)); @@ -391,12 +391,12 @@ void DumpAppSpawnMsg(const AppSpawnMsgNode *message) } AppSpawnMsgBundleInfo *bundleInfo = (AppSpawnMsgBundleInfo *)GetAppSpawnMsgInfo(message, TLV_BUNDLE_INFO); APPSPAWN_ONLY_EXPER(bundleInfo != NULL, - APPSPAWN_DUMP("App bundle info name: \"%{public}s\" index: %{public}d", + APPSPAWN_DUMP("App BundleName:\"%{public}s\" index: %{public}d", bundleInfo->bundleName, bundleInfo->bundleIndex)); AppSpawnMsgDomainInfo *domainInfo = (AppSpawnMsgDomainInfo *)GetAppSpawnMsgInfo(message, TLV_DOMAIN_INFO); APPSPAWN_ONLY_EXPER(domainInfo != NULL, - APPSPAWN_DUMP("App domain info hap: 0x%{public}x apl: \"%{public}s\"", domainInfo->hapFlags, domainInfo->apl)); + APPSPAWN_DUMP("App DomainHap:0x%{public}x apl:\"%{public}s\"", domainInfo->hapFlags, domainInfo->apl)); AppSpawnMgr *mgr = GetAppSpawnMgr(); if (mgr == NULL || ((mgr->flags & APP_DEVELOPER_MODE) != APP_DEVELOPER_MODE)) { @@ -404,7 +404,7 @@ void DumpAppSpawnMsg(const AppSpawnMsgNode *message) } AppSpawnMsgOwnerId *owner = (AppSpawnMsgOwnerId *)GetAppSpawnMsgInfo(message, TLV_OWNER_INFO); - APPSPAWN_ONLY_EXPER(owner != NULL, APPSPAWN_LOGV("App owner info: \"%{public}s\" ", owner->ownerId)); + APPSPAWN_ONLY_EXPER(owner != NULL, APPSPAWN_LOGV("App OwnerId:\"%{public}s\"", owner->ownerId)); AppSpawnMsgInternetInfo *info = (AppSpawnMsgInternetInfo *)GetAppSpawnMsgInfo(message, TLV_INTERNET_INFO); APPSPAWN_ONLY_EXPER(info != NULL, diff --git a/standard/appspawn_service.c b/standard/appspawn_service.c index aae3dd26d27a92711ee1102148f3deba9f44d076..de1f3c89e202760f278bdc0bf1684054422c38e3 100644 --- a/standard/appspawn_service.c +++ b/standard/appspawn_service.c @@ -167,7 +167,7 @@ APPSPAWN_STATIC void WriteSignalInfoToFd(AppSpawnedProcess *appInfo, AppSpawnCon APPSPAWN_LOGE("Spawn Listen failed to write signal info to fd errno %{public}d", errno); return; } - APPSPAWN_LOGI("Spawn Listen successfully write signal info[%{public}s] to fd", jsonString); + APPSPAWN_LOGV("Spawn Listen successfully write signal info[%{public}s] to fd", jsonString); free(jsonString); } @@ -667,7 +667,7 @@ static int AddChildWatcher(AppSpawningCtx *property) watchInfo.events = EVENT_READ; watchInfo.processEvent = ProcessChildResponse; LE_STATUS status = LE_StartWatcher(LE_GetDefaultLoop(), &property->forkCtx.watcherHandle, &watchInfo, property); - APPSPAWN_LOGI("AddChildWatcher with timeout %{public}u fd %{public}d", timeout, watchInfo.fd); + APPSPAWN_LOGV("AddChildWatcher with timeout %{public}u fd %{public}d", timeout, watchInfo.fd); APPSPAWN_CHECK(status == LE_SUCCESS, return APPSPAWN_SYSTEM_ERROR, "Failed to watch child %{public}d", property->pid); status = LE_CreateTimer(LE_GetDefaultLoop(), &property->forkCtx.timer, WaitChildTimeout, property);