未验证 提交 bcbdd177 编写于 作者: O openharmony_ci 提交者: Gitee

!2015 修改log显示

Merge pull request !2015 from cheng_jinsong/init_log
...@@ -356,9 +356,14 @@ void CmdServiceStatusChange(const char *key, const ServiceInfo *status) ...@@ -356,9 +356,14 @@ void CmdServiceStatusChange(const char *key, const ServiceInfo *status)
"critical", "critical",
}; };
PLUGIN_CHECK(key != NULL && status != NULL, return, "Invalid parameter"); PLUGIN_CHECK(key != NULL && status != NULL, return, "Invalid parameter");
printf("Service %s status: %s pid %d \n", key, if (status->status == SERVICE_STARTED || status->status == SERVICE_READY) {
((status->status < ARRAY_LENGTH(serviceStatusMap)) ? serviceStatusMap[status->status] : "unknown"), printf("Service %s status: %s pid %d \n", key,
status->pid); ((status->status < ARRAY_LENGTH(serviceStatusMap)) ? serviceStatusMap[status->status] : "unknown"),
status->pid);
} else {
printf("Service %s status: %s \n", key,
(status->status < ARRAY_LENGTH(serviceStatusMap)) ? serviceStatusMap[status->status] : "unknown");
}
} }
static int32_t BShellParamCmdWatchService(BShellHandle shell, int32_t argc, char *argv[]) static int32_t BShellParamCmdWatchService(BShellHandle shell, int32_t argc, char *argv[])
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册