diff --git a/modules/common/appspawn_silk.c b/modules/common/appspawn_silk.c index 2f8d9141062478031e78286e85cd0aede4c30a75..b709edeaae20249c4f4224b6d606348b860ae5e9 100644 --- a/modules/common/appspawn_silk.c +++ b/modules/common/appspawn_silk.c @@ -110,7 +110,7 @@ APPSPAWN_STATIC bool ParseSilkConfig(const cJSON *root, struct SilkConfig *confi void LoadSilkConfig(void) { cJSON *root = GetJsonObjFromFile(SILK_JSON_CONFIG_PATH); - APPSPAWN_CHECK(root != NULL, return, "Failed to load silk config"); + APPSPAWN_CHECK_LOGW(root != NULL, return, "Failed to load silk config"); (void)ParseSilkConfig(root, &g_silkConfig); cJSON_Delete(root); } diff --git a/modules/sandbox/sandbox_dec.c b/modules/sandbox/sandbox_dec.c index 8e36ea2e4113757d97e0ab797eb7b2e865b14136..58ffa3ca10dc4b22f93c0e535a2f323d224681f0 100644 --- a/modules/sandbox/sandbox_dec.c +++ b/modules/sandbox/sandbox_dec.c @@ -106,7 +106,7 @@ static int SetDenyConstraintDirs(AppSpawnMgr *content) const char *decFilename = "/dev/dec"; int fd = open(decFilename, O_RDWR); if (fd < 0) { - APPSPAWN_LOGE("open dec file fail."); + APPSPAWN_LOGW("open dec file fail."); return 0; } @@ -140,7 +140,7 @@ static int SetForcedPrefixDirs(AppSpawnMgr *content) const char *decFilename = "/dev/dec"; int fd = open(decFilename, O_RDWR); if (fd < 0) { - APPSPAWN_LOGE("open dec file fail."); + APPSPAWN_LOGW("open dec file fail."); return 0; } @@ -175,7 +175,7 @@ void SetDecPolicy(void) const char *decFilename = "/dev/dec"; int fd = open(decFilename, O_RDWR); if (fd < 0) { - APPSPAWN_LOGE("open dec file fail."); + APPSPAWN_LOGW("open dec file fail."); DestroyDecPolicyInfos(g_decPolicyInfos); g_decPolicyInfos = NULL; return; diff --git a/modules/sysevent/event_reporter.cpp b/modules/sysevent/event_reporter.cpp index 5a22925a7c5b6368bcf87e1cd147116786fa3dd1..9d210753e02b2b17b80fee4bd1c83ca5792f9e90 100644 --- a/modules/sysevent/event_reporter.cpp +++ b/modules/sysevent/event_reporter.cpp @@ -48,7 +48,7 @@ void ProcessMgrRemoveApp(const char* processName, int pid, int uid, int status) int ret = HiSysEventWrite(HiSysEvent::Domain::STARTUP, KEY_PROCESS_EXIT, HiSysEvent::EventType::BEHAVIOR, KEY_NAME, pname, KEY_PID, pid, KEY_UID, uid, KEY_STATUS, status); if (ret != 0) { - APPSPAWN_LOGE("ProcessMgrRemoveApp error, ret: %{public}d", ret); + APPSPAWN_LOGW("ProcessMgrRemoveApp error, ret: %{public}d", ret); } } } diff --git a/standard/appspawn_kickdog.c b/standard/appspawn_kickdog.c index ef01677b8802e50df7c776abfa727d1e3bfed14c..73acd4e4c0a522e75f0d89ba64a7a411314c7f31 100644 --- a/standard/appspawn_kickdog.c +++ b/standard/appspawn_kickdog.c @@ -127,7 +127,7 @@ static int CheckKernelType(bool *isLinux) APPSPAWN_STATIC int SpawnKickDogStart(AppSpawnMgr *mgrContent) { APPSPAWN_CHECK(mgrContent != NULL, return 0, "content is null"); - APPSPAWN_CHECK((mgrContent->content.mode == MODE_FOR_APP_SPAWN) || + APPSPAWN_CHECK_LOGW((mgrContent->content.mode == MODE_FOR_APP_SPAWN) || (mgrContent->content.mode == MODE_FOR_NWEB_SPAWN) || (mgrContent->content.mode == MODE_FOR_HYBRID_SPAWN), return 0, "Mode %{public}u no need enable watchdog", mgrContent->content.mode); diff --git a/standard/appspawn_main.c b/standard/appspawn_main.c index ac4f7da8a7256a09e657bb61035d9222a2f825c1..2fd9d2d7a4f2ada271693b3f7dc138776c98c67e 100644 --- a/standard/appspawn_main.c +++ b/standard/appspawn_main.c @@ -74,7 +74,7 @@ static void CheckPreload(char *const argv[]) APPSPAWN_CHECK(nread != -1, return, "readlink fail: /proc/self/exe: %{public}d", errno); buf[nread] = 0; ret = execv(buf, argv); - APPSPAWN_LOGE("execv fail: %{public}s: %{public}d: %{public}d", buf, errno, ret); + APPSPAWN_LOGI("execv fail: %{public}s: %{public}d: %{public}d", buf, errno, ret); } #ifndef NATIVE_SPAWN diff --git a/standard/appspawn_manager.h b/standard/appspawn_manager.h index 0ff876863194b849efd4810193b68716648506ae..3925e59d35c3555a52206d617d5ddcff6d1fcf95 100644 --- a/standard/appspawn_manager.h +++ b/standard/appspawn_manager.h @@ -285,7 +285,7 @@ APPSPAWN_INLINE void *GetAppProperty(const AppSpawningCtx *property, uint32_t ty APPSPAWN_INLINE void *GetAppPropertyExt(const AppSpawningCtx *property, const char *name, uint32_t *len) { APPSPAWN_CHECK(name != NULL, return NULL, "Invalid name "); - APPSPAWN_CHECK(property != NULL && property->message != NULL, + APPSPAWN_CHECK_LOGW(property != NULL && property->message != NULL, return NULL, "Invalid property for name %{public}s", name); return GetAppSpawnMsgExtInfo(property->message, name, len); } diff --git a/standard/appspawn_service.c b/standard/appspawn_service.c index d80261f10a9954c44d0ad004d2bc34bafa3fd5a8..894fe12e4c617a36a2533f67677861c27089e375 100644 --- a/standard/appspawn_service.c +++ b/standard/appspawn_service.c @@ -124,7 +124,7 @@ static inline void DumpStatus(const char *appName, pid_t pid, int status, int *s APPSPAWN_STATIC void WriteSignalInfoToFd(AppSpawnedProcess *appInfo, AppSpawnContent *content, int signal) { - APPSPAWN_CHECK(content->signalFd > 0, return, "Invalid signal fd[%{public}d]", content->signalFd); + APPSPAWN_CHECK_LOGW(content->signalFd > 0, return, "Invalid signal fd[%{public}d]", content->signalFd); APPSPAWN_CHECK(appInfo->pid > 0, return, "Invalid pid[%{public}d]", appInfo->pid); APPSPAWN_CHECK(appInfo->uid > 0, return, "Invalid uid[%{public}d]", appInfo->uid); APPSPAWN_CHECK(appInfo->name != NULL, return, "Invalid name"); diff --git a/util/src/appspawn_utils.c b/util/src/appspawn_utils.c index 20d8ca2e0c125943322d2d02f967666afb70ee61..3553cb7e8f27ccf5b4ba7dbc860a70a93dda35a2 100644 --- a/util/src/appspawn_utils.c +++ b/util/src/appspawn_utils.c @@ -300,7 +300,7 @@ int ParseJsonConfig(const char *basePath, const char *fileName, ParseConfig pars APPSPAWN_CHECK(len > 0 && (size_t)len < sizeof(path), ret = APPSPAWN_SANDBOX_INVALID; continue, "Failed to format sandbox config file name %{public}s %{public}s", files->paths[i], fileName); cJSON *root = GetJsonObjFromFile(path); - APPSPAWN_CHECK(root != NULL, ret = APPSPAWN_SANDBOX_INVALID; + APPSPAWN_CHECK_LOGW(root != NULL, ret = APPSPAWN_SANDBOX_INVALID; continue, "Failed to load app data sandbox config %{public}s", path); int rc = parseConfig(root, context); if (rc != 0) {