diff --git a/common/appspawn_server.c b/common/appspawn_server.c index c59f93fa3453db3570049616fad8ff9213b66485..efd65a01c6c4b139917bd0f23b79540f71860f5e 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/standard/appspawn_appmgr.c b/standard/appspawn_appmgr.c index 7866bac892a5174e9ee938c918442b70ea58aa87..3f0efef4db81d2c4e1bc9dfd997d32ef7cd27689 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..10ede3c87228d279932420d053bd3be0a423eee4 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 4c45e88ba46d6adc66b21979e2b34a7ac4693af7..11163d07f685cccf125e2c4b47a817ec75c88ef6 100644 --- a/standard/appspawn_msgmgr.c +++ b/standard/appspawn_msgmgr.c @@ -361,10 +361,10 @@ static inline void DumpMsgExtInfo(const AppSpawnTlv *tlv) } AppSpawnTlvExt *tlvExt = (AppSpawnTlvExt *)(tlv); if (tlvExt->dataType == DATA_TYPE_STRING) { - APPSPAWN_LOGV("App extend info name: %{public}s len: %{public}u value: '%{public}s'", + APPSPAWN_LOGV("AppExtendName: %{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); } } @@ -375,7 +375,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)); @@ -390,12 +390,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)) { @@ -403,7 +403,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 5fb55e3cd672557fcfbecb5c80c1099e00056abe..252d33b7447d6bec4e214883c9fca6dfe8212131 100644 --- a/standard/appspawn_service.c +++ b/standard/appspawn_service.c @@ -666,7 +666,6 @@ 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_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);