diff --git a/ipc/native/src/core/framework/include/ipc_debug.h b/ipc/native/src/core/framework/include/ipc_debug.h index 0161416346c4ccf36044ba4a54ecfe3082c0e958..2a9536baa5f344d3c96ace8e8eebb767c69ca32e 100644 --- a/ipc/native/src/core/framework/include/ipc_debug.h +++ b/ipc/native/src/core/framework/include/ipc_debug.h @@ -26,31 +26,31 @@ namespace OHOS { #define ZLOGF(LOG_LABEL, fmt, args...) \ if (HiLogIsLoggable(LOG_LABEL.domain, LOG_LABEL.tag, LOG_FATAL)) { \ HILOG_IMPL(LOG_CORE, LOG_FATAL, LOG_LABEL.domain, LOG_LABEL.tag, \ - "%{public}s %{public}d: " fmt, __FUNCTION__, __LINE__, ##args); \ + "%{public}s: " fmt, __FUNCTION__, ##args); \ } #define ZLOGE(LOG_LABEL, fmt, args...) \ if (HiLogIsLoggable(LOG_LABEL.domain, LOG_LABEL.tag, LOG_ERROR)) { \ HILOG_IMPL(LOG_CORE, LOG_ERROR, LOG_LABEL.domain, LOG_LABEL.tag, \ - "%{public}s %{public}d: " fmt, __FUNCTION__, __LINE__, ##args); \ + "%{public}s: " fmt, __FUNCTION__, ##args); \ } #define ZLOGW(LOG_LABEL, fmt, args...) \ if (HiLogIsLoggable(LOG_LABEL.domain, LOG_LABEL.tag, LOG_WARN)) { \ HILOG_IMPL(LOG_CORE, LOG_WARN, LOG_LABEL.domain, LOG_LABEL.tag, \ - "%{public}s %{public}d: " fmt, __FUNCTION__, __LINE__, ##args); \ + "%{public}s: " fmt, __FUNCTION__, ##args); \ } #define ZLOGI(LOG_LABEL, fmt, args...) \ if (HiLogIsLoggable(LOG_LABEL.domain, LOG_LABEL.tag, LOG_INFO)) { \ HILOG_IMPL(LOG_CORE, LOG_INFO, LOG_LABEL.domain, LOG_LABEL.tag, \ - "%{public}s %{public}d: " fmt, __FUNCTION__, __LINE__, ##args); \ + "%{public}s: " fmt, __FUNCTION__, ##args); \ } #define ZLOGD(LOG_LABEL, fmt, args...) \ if (HiLogIsLoggable(LOG_LABEL.domain, LOG_LABEL.tag, LOG_DEBUG)) { \ HILOG_IMPL(LOG_CORE, LOG_DEBUG, LOG_LABEL.domain, LOG_LABEL.tag, \ - "%{public}s %{public}d: " fmt, __FUNCTION__, __LINE__, ##args); \ + "%{public}s: " fmt, __FUNCTION__, ##args); \ } using ErrorMap = std::map; diff --git a/ipc/native/src/core/framework/source/ipc_object_proxy.cpp b/ipc/native/src/core/framework/source/ipc_object_proxy.cpp index 96427d3265fd95865a5be3d427956a6d56f31de3..153e13146240ea993bfeb663172b6b964aed0282 100644 --- a/ipc/native/src/core/framework/source/ipc_object_proxy.cpp +++ b/ipc/native/src/core/framework/source/ipc_object_proxy.cpp @@ -203,8 +203,8 @@ int IPCObjectProxy::SendRequest(uint32_t code, MessageParcel &data, MessageParce #endif auto timeInterval = std::chrono::duration_cast(endTime - beginTime).count(); if (timeInterval > SEND_REQUEST_TIMEOUT) { - ZLOGD(LABEL, "DFX_BlockMonitor IPC cost %{public}lld ms, interface code:%{public}u, desc:%{public}s", - timeInterval, code, desc.c_str()); + ZLOGW(LABEL, "DFX_BlockMonitor cost %{public}lld ms, code:%{public}u, desc:%{public}s", timeInterval, + code, desc.c_str()); } return err; } @@ -505,7 +505,7 @@ bool IPCObjectProxy::AddDeathRecipient(const sptr &recipient) bool IPCObjectProxy::RemoveDeathRecipient(const sptr &recipient) { if (recipient == nullptr) { - ZLOGD(LABEL, "recipient is null"); + ZLOGE(LABEL, "recipient is null"); return false; } std::string desc; diff --git a/ipc/native/src/core/framework/source/ipc_object_stub.cpp b/ipc/native/src/core/framework/source/ipc_object_stub.cpp index 392ffdca121a9509f83333c67bae4d822d3fd40d..ad702ac000199b0974da2e14437e5beeac4d478c 100644 --- a/ipc/native/src/core/framework/source/ipc_object_stub.cpp +++ b/ipc/native/src/core/framework/source/ipc_object_stub.cpp @@ -414,8 +414,8 @@ int IPCObjectStub::SendRequestInner(uint32_t code, MessageParcel &data, MessageP uint32_t duration = static_cast(std::chrono::duration_cast( finish - start).count()); if (duration >= IPC_CMD_PROCESS_WARN_TIME) { - ZLOGD(LABEL, "stub:%{public}s deal request code:%{public}u cost time:%{public}ums", - remoteDescriptor_.c_str(), code, duration / COEFF_MILLI_TO_MICRO); + ZLOGW(LABEL, "Stub(desc:%{public}s) code:%{public}u cost:%{public}ums", remoteDescriptor_.c_str(), code, + duration / COEFF_MILLI_TO_MICRO); if (duration >= IPC_CMD_PROCESS_DFX_REPORT_TIME) { DfxReportRequestProcEvent(remoteDescriptor_.c_str(), static_cast(duration / COEFF_MILLI_TO_MICRO), static_cast(code), __FUNCTION__); @@ -589,7 +589,7 @@ int32_t IPCObjectStub::InvokerThread(uint32_t code, MessageParcel &data, Message int32_t IPCObjectStub::InvokerDataBusThread(MessageParcel &data, MessageParcel &reply) { - ZLOGD(LABEL, "enter"); + ZLOGI(LABEL, "enter"); std::string deviceId = data.ReadString(); uint32_t remotePid = data.ReadUint32(); uint32_t remoteUid = data.ReadUint32(); @@ -619,7 +619,7 @@ int32_t IPCObjectStub::InvokerDataBusThread(MessageParcel &data, MessageParcel & } uint32_t selfTokenId = static_cast(IPCSkeleton::GetSelfTokenID()); - ZLOGI(LABEL, "invoke databus thread, local deviceId:%{public}s remote deviceId:%{public}s " + ZLOGI(LABEL, "local deviceId:%{public}s remote deviceId:%{public}s " "stubIndex:%{public}" PRIu64 " sessionName:%{public}s", IPCProcessSkeleton::ConvertToSecureString(deviceId).c_str(), IPCProcessSkeleton::ConvertToSecureString(remoteDeviceId).c_str(), stubIndex, sessionName.c_str()); @@ -696,7 +696,7 @@ int32_t IPCObjectStub::AddAuthInfo(MessageParcel &data, MessageParcel &reply, ui // LCOV_EXCL_START std::string IPCObjectStub::GetSessionName() { - ZLOGD(LABEL, "enter"); + ZLOGI(LABEL, "enter"); IPCProcessSkeleton *current = IPCProcessSkeleton::GetCurrent(); if (current == nullptr) { ZLOGE(LABEL, "get current is null"); @@ -720,7 +720,7 @@ std::string IPCObjectStub::GetSessionName() int32_t IPCObjectStub::GetGrantedSessionName(uint32_t code, MessageParcel &data, MessageParcel &reply, MessageOption &option) { - ZLOGD(LABEL, "enter"); + ZLOGI(LABEL, "enter"); int pid = IPCSkeleton::GetCallingPid(); int uid = IPCSkeleton::GetCallingUid(); std::string sessionName = CreateSessionName(uid, pid); diff --git a/ipc/native/src/core/framework/source/ipc_workthread.cpp b/ipc/native/src/core/framework/source/ipc_workthread.cpp index 2c741d0b50931f0687c546c13fe87853e1e86cbb..41e53907980cfdcc5f67d8abae921a008ca1497b 100644 --- a/ipc/native/src/core/framework/source/ipc_workthread.cpp +++ b/ipc/native/src/core/framework/source/ipc_workthread.cpp @@ -106,7 +106,7 @@ void *IPCWorkThread::ThreadHandler(void *args) } if (process->GetThreadStopFlag()) { - ZLOGD(LOG_LABEL, "the stop flag is true, thread start exit"); + ZLOGD(LOG_LABEL, "process is exiting"); delete param; return nullptr; } @@ -154,7 +154,7 @@ bool IPCWorkThread::Start(int policy, int proto, int threadIndex) } if (process->GetThreadStopFlag()) { - ZLOGD(LOG_LABEL, "the stop flag is true, can not create other thread"); + ZLOGD(LOG_LABEL, "process is exiting"); return false; } diff --git a/ipc/native/src/core/framework/source/iremote_broker.cpp b/ipc/native/src/core/framework/source/iremote_broker.cpp index 6327446f33b270ed1564623bc790d8096c1b6df0..1add23e536b51ebdc3989249ca24f08f72e89714 100644 --- a/ipc/native/src/core/framework/source/iremote_broker.cpp +++ b/ipc/native/src/core/framework/source/iremote_broker.cpp @@ -94,7 +94,10 @@ void BrokerRegistration::Unregister(const std::u16string &descriptor) for (auto iter = objects_.begin(); iter != objects_.end();) { std::string soPath = GetObjectSoPath(iter->first); if (soPath.empty() || (soPath != iter->second)) { - ZLOGD(LABEL, "path:%{public}s is dlclosed", iter->second.c_str()); + size_t pos = iter->second.find_last_of('/'); + const char *soName = (pos != std::string::npos) ? iter->second.substr(pos + 1).c_str() + : iter->second.c_str(); + ZLOGW(LABEL, "%{public}s is dlclosed", soName); iter = objects_.erase(iter); continue; } diff --git a/ipc/native/src/core/framework/source/process_skeleton.cpp b/ipc/native/src/core/framework/source/process_skeleton.cpp index f7fc8b5f28ee9f7c0d070f5ab4d841e2d675f5e2..8f7801a8fbdac424b2848d782b2db8668797b7ef 100644 --- a/ipc/native/src/core/framework/source/process_skeleton.cpp +++ b/ipc/native/src/core/framework/source/process_skeleton.cpp @@ -157,7 +157,7 @@ bool ProcessSkeleton::AttachObject(IRemoteObject *object, const std::u16string & (void)isContainStub_.insert(std::pair(object, true)); if (descriptor.empty()) { - ZLOGE(LOG_LABEL, "descriptor is null %{public}u", ConvertAddr(object)); + ZLOGD(LOG_LABEL, "descriptor is null %{public}u", ConvertAddr(object)); return false; } // If attemptIncStrong failed, old proxy might still exist, replace it with the new proxy. @@ -166,7 +166,7 @@ bool ProcessSkeleton::AttachObject(IRemoteObject *object, const std::u16string & if (object->IsProxyObject()) { uint64_t proxyObjectCountNum = proxyObjectCountNum_.fetch_add(1, std::memory_order_relaxed) + 1; if (ipcProxyCallback_ != nullptr && ipcProxyLimitNum_ > 0 && proxyObjectCountNum > ipcProxyLimitNum_) { - ZLOGW(LOG_LABEL, "ipc proxy num:%{public}" PRIu64 " exceeds limit:%{public}" PRIu64, proxyObjectCountNum, + ZLOGD(LOG_LABEL, "ipc proxy num:%{public}" PRIu64 " exceeds limit:%{public}" PRIu64, proxyObjectCountNum, ipcProxyLimitNum_); ipcProxyCallback_(proxyObjectCountNum); } @@ -490,8 +490,7 @@ void ProcessSkeleton::NotifyChildThreadStop() if (connector != nullptr) { connector->CloseDriverFd(); } - ZLOGD(LOG_LABEL, "start waiting for child thread to exit, child thread num:%{public}zu", - runningChildThreadNum_.load()); + ZLOGI(LOG_LABEL, "waiting %{public}zu child threads to exit", runningChildThreadNum_.load()); std::unique_lock lockGuard(threadCountMutex_); threadCountCon_.wait_for(lockGuard, std::chrono::seconds(MAIN_THREAD_MAX_WAIT_TIME), [&threadNum = this->runningChildThreadNum_] { diff --git a/ipc/native/src/core/invoker/include/binder_invoker.h b/ipc/native/src/core/invoker/include/binder_invoker.h index d8743e2bb4b6c8550c036523d51b8f88cf361ebc..f718c80f2840b1c9a534f8fae9948890ff1426a9 100644 --- a/ipc/native/src/core/invoker/include/binder_invoker.h +++ b/ipc/native/src/core/invoker/include/binder_invoker.h @@ -227,6 +227,10 @@ private: void ProcDeferredDecRefs(); + bool IsVaildDriver(); + + bool IsProcessExiting(); + #ifndef CONFIG_IPC_SINGLE bool AddCommAuth(int32_t handle, flat_binder_object *flat); diff --git a/ipc/native/src/core/invoker/source/binder_invoker.cpp b/ipc/native/src/core/invoker/source/binder_invoker.cpp index 1da92858e76bbf6c3fb58d6b988c16af8cf542d2..164fb42d1c807f7d0811b9bceabd3928dbe95f0c 100644 --- a/ipc/native/src/core/invoker/source/binder_invoker.cpp +++ b/ipc/native/src/core/invoker/source/binder_invoker.cpp @@ -294,7 +294,7 @@ bool BinderInvoker::RemoveDeathRecipient(int32_t handle, void *cookie) // LCOV_EXCL_START sptr BinderInvoker::GetSAMgrObject() { - ZLOGD(LABEL, "get samgr object!"); + ZLOGI(LABEL, "get samgr object!"); IPCProcessSkeleton *current = IPCProcessSkeleton::GetCurrent(); if (current != nullptr) { return current->GetRegistryObject(); @@ -447,10 +447,20 @@ bool BinderInvoker::UnFlattenDBinderObject(Parcel &parcel, dbinder_negotiation_d } #endif -bool BinderInvoker::SetMaxWorkThread(int maxThreadNum) +bool BinderInvoker::IsVaildDriver() { if ((binderConnector_ == nullptr) || (!binderConnector_->IsDriverAlive())) { - ZLOGE(LABEL, "died"); + return false; + } + return true; +} + +bool BinderInvoker::SetMaxWorkThread(int maxThreadNum) +{ + if (!IsVaildDriver()) { + if (ProcessSkeleton::IsPrint(IPC_INVOKER_CONNECT_ERR, lastErr_, lastErrCnt_)) { + ZLOGE(LABEL, "died"); + } return false; } @@ -465,8 +475,10 @@ bool BinderInvoker::SetMaxWorkThread(int maxThreadNum) int BinderInvoker::FlushCommands(IRemoteObject *object) { - if ((binderConnector_ == nullptr) || (!binderConnector_->IsDriverAlive())) { - ZLOGE(LABEL, "died"); + if (!IsVaildDriver()) { + if (ProcessSkeleton::IsPrint(IPC_INVOKER_CONNECT_ERR, lastErr_, lastErrCnt_)) { + ZLOGE(LABEL, "died"); + } return IPC_INVOKER_CONNECT_ERR; } int error = TransactWithDriver(false); @@ -496,25 +508,36 @@ int BinderInvoker::FlushCommands(IRemoteObject *object) void BinderInvoker::ExitCurrentThread() { - if ((binderConnector_ == nullptr) || (!binderConnector_->IsDriverAlive())) { - ZLOGE(LABEL, "died"); + if (!IsVaildDriver()) { + if (ProcessSkeleton::IsPrint(IPC_INVOKER_CONNECT_ERR, lastErr_, lastErrCnt_)) { + ZLOGE(LABEL, "died"); + } return; } binderConnector_->ExitCurrentThread(BINDER_THREAD_EXIT); } +bool BinderInvoker::IsProcessExiting() +{ + ProcessSkeleton *process = ProcessSkeleton::GetInstance(); + if (process == nullptr || process->GetThreadStopFlag()) { + return true; + } + return false; +} // LCOV_EXCL_START void BinderInvoker::StartWorkLoop() { - if ((binderConnector_ == nullptr) || (!binderConnector_->IsDriverAlive())) { - ZLOGE(LABEL, "died"); + if (!IsVaildDriver()) { + if (ProcessSkeleton::IsPrint(IPC_INVOKER_CONNECT_ERR, lastErr_, lastErrCnt_)) { + ZLOGE(LABEL, "died"); + } return; } int error; isFirstInvoke_ = STATUS_FIRST_INVOKE; do { - ProcessSkeleton *process = ProcessSkeleton::GetInstance(); - if (process == nullptr || process->GetThreadStopFlag()) { + if (IsProcessExiting()) { break; } error = TransactWithDriver(); @@ -537,8 +560,11 @@ void BinderInvoker::StartWorkLoop() if ((cmd == BR_TRANSACTION) || (cmd == BR_TRANSACTION_SEC_CTX)) { isFirstInvoke_ = STATUS_NOT_FIRST_INVOKE; } - if ((userError == -ERR_TIMED_OUT || userError == IPC_INVOKER_INVALID_DATA_ERR) && !isMainWorkThread) { - ZLOGD(LABEL, "exit, error:%{public}d", userError); + if (userError == -ERR_TIMED_OUT && !isMainWorkThread) { + break; + } + if (userError == IPC_INVOKER_INVALID_DATA_ERR && !isMainWorkThread) { + ZLOGW(LABEL, "exit, error:%{public}d", userError); break; } ProcDeferredDecRefs(); @@ -1007,7 +1033,7 @@ int BinderInvoker::HandleCommands(uint32_t cmd) int error = HandleCommandsInner(cmd); if (error != ERR_NONE && error != -ERR_TIMED_OUT) { if (ProcessSkeleton::IsPrint(error, lastErr_, lastErrCnt_)) { - ZLOGE(LABEL, "HandleCommands cmd:%{public}u error:%{public}d", cmd, error); + ZLOGE(LABEL, "cmd:%{public}u error:%{public}d", cmd, error); PrintParcelData(input_, "input_"); PrintParcelData(output_, "output_"); std::string backtrace; @@ -1038,7 +1064,7 @@ void BinderInvoker::JoinThread(bool initiative) output_.WriteUint32(BC_EXIT_LOOPER); // pass in nullptr directly FlushCommands(nullptr); - ZLOGD(LABEL, "Current Thread:%{public}d is leaving", getpid()); + ZLOGD(LABEL, "Current Thread is leaving"); } void BinderInvoker::JoinProcessThread(bool initiative) {} @@ -1244,8 +1270,10 @@ void BinderInvoker::DealWithCmd(MessageParcel *reply, bool &continueLoop, int32_ int BinderInvoker::WaitForCompletion(MessageParcel *reply) { - if ((binderConnector_ == nullptr) || (!binderConnector_->IsDriverAlive())) { - ZLOGD(LABEL, "died"); + if (!IsVaildDriver()) { + if (ProcessSkeleton::IsPrint(IPC_INVOKER_CONNECT_ERR, lastErr_, lastErrCnt_)) { + ZLOGE(LABEL, "died"); + } return IPC_INVOKER_CONNECT_ERR; } uint32_t cmd; @@ -1657,8 +1685,10 @@ bool BinderInvoker::SetCallingIdentity(std::string &identity, bool flag) // LCOV_EXCL_START bool BinderInvoker::TriggerSystemIPCThreadReclaim() { - if ((binderConnector_ == nullptr) || (!binderConnector_->IsDriverAlive())) { - ZLOGE(LABEL, "died"); + if (!IsVaildDriver()) { + if (ProcessSkeleton::IsPrint(IPC_INVOKER_CONNECT_ERR, lastErr_, lastErrCnt_)) { + ZLOGE(LABEL, "died"); + } return false; } @@ -1674,8 +1704,10 @@ bool BinderInvoker::TriggerSystemIPCThreadReclaim() bool BinderInvoker::EnableIPCThreadReclaim(bool enable) { - if ((binderConnector_ == nullptr) || (!binderConnector_->IsDriverAlive())) { - ZLOGE(LABEL, "died"); + if (!IsVaildDriver()) { + if (ProcessSkeleton::IsPrint(IPC_INVOKER_CONNECT_ERR, lastErr_, lastErrCnt_)) { + ZLOGE(LABEL, "died"); + } return false; } diff --git a/ipc/native/src/napi/src/napi_ipc_skeleton.cpp b/ipc/native/src/napi/src/napi_ipc_skeleton.cpp index dcb8616c93d91bc7b5e26fc64dbcdab4e7786676..6b551630a0a2b33400ce01b57d09e86510648cd5 100644 --- a/ipc/native/src/napi/src/napi_ipc_skeleton.cpp +++ b/ipc/native/src/napi/src/napi_ipc_skeleton.cpp @@ -149,6 +149,7 @@ napi_value NAPI_IPCSkeleton_flushCommands(napi_env env, napi_callback_info info) NAPI_ASSERT(env, valueType == napi_object, "type mismatch for parameter 1"); sptr target = NAPI_ohos_rpc_getNativeRemoteObject(env, argv[ARGV_INDEX_0]); + NAPI_ASSERT(env, target != nullptr, "remote object is null"); int32_t result = IPCSkeleton::FlushCommands(target); napi_value napiValue = nullptr; NAPI_CALL(env, napi_create_int32(env, result, &napiValue)); @@ -175,6 +176,7 @@ napi_value NAPI_IPCSkeleton_flushCmdBuffer(napi_env env, napi_callback_info info } sptr target = NAPI_ohos_rpc_getNativeRemoteObject(env, argv[ARGV_INDEX_0]); + NAPI_ASSERT(env, target != nullptr, "remote object is null"); IPCSkeleton::FlushCommands(target); napi_value napiValue = nullptr; napi_get_undefined(env, &napiValue); diff --git a/ipc/native/src/napi/src/napi_remote_proxy.cpp b/ipc/native/src/napi/src/napi_remote_proxy.cpp index 74d39216e70e8464cb32a396f1e0143bfc9e2be9..644a298ca5f59f47e378a7131ade2545478ccd14 100644 --- a/ipc/native/src/napi/src/napi_remote_proxy.cpp +++ b/ipc/native/src/napi/src/napi_remote_proxy.cpp @@ -632,7 +632,7 @@ napi_value NAPI_RemoteProxy_getDescriptor(napi_env env, napi_callback_info info) } std::u16string remoteDescriptor = target->GetInterfaceDescriptor(); if (remoteDescriptor == std::u16string()) { - ZLOGD(LOG_LABEL, "failed to get interface descriptor"); + ZLOGE(LOG_LABEL, "failed to get interface descriptor"); return napiErr.ThrowError(env, errorDesc::COMMUNICATION_ERROR); } napi_create_string_utf8(env, Str16ToStr8(remoteDescriptor).c_str(), NAPI_AUTO_LENGTH, &result); diff --git a/ipc/native/src/napi_common/source/napi_message_sequence_read.cpp b/ipc/native/src/napi_common/source/napi_message_sequence_read.cpp index 3781283abcc153951d04488cc7f22a60d87d1d10..c364c0e6232f3607c77a3ac17d2814934d0ce979 100644 --- a/ipc/native/src/napi_common/source/napi_message_sequence_read.cpp +++ b/ipc/native/src/napi_common/source/napi_message_sequence_read.cpp @@ -999,7 +999,7 @@ static int32_t GetArraySize(napi_env env, napi_callback_info info, napi_value &t int32_t arraySize = 0; napi_get_value_int32(env, argv[ARGV_INDEX_0], &arraySize); if (arraySize <= 0) { - ZLOGD(LOG_LABEL, "arraySize is %{public}d, error", arraySize); + ZLOGE(LOG_LABEL, "arraySize is %{public}d, error", arraySize); napi_create_array(env, &result); } return arraySize; diff --git a/ipc/native/src/napi_common/source/napi_remote_object.cpp b/ipc/native/src/napi_common/source/napi_remote_object.cpp index 98439a0263a9b71baa433a5490be4e22b28bbec5..80a642c7b02ca9dff506fb6e0a32393795651e97 100644 --- a/ipc/native/src/napi_common/source/napi_remote_object.cpp +++ b/ipc/native/src/napi_common/source/napi_remote_object.cpp @@ -258,7 +258,7 @@ static bool CreateThenCallback(CallbackParam *param, napi_value &thenValue) static napi_value CatchCallback(napi_env env, napi_callback_info info) { - ZLOGD(LOG_LABEL, "call js onRemoteRequest got exception"); + ZLOGW(LOG_LABEL, "call js onRemoteRequest got exception"); size_t argc = 1; napi_value argv[ARGV_LENGTH_1] = {nullptr}; void* data = nullptr; @@ -321,7 +321,7 @@ static void CallJsOnRemoteRequestCallback(CallbackParam *param, napi_value &onRe do { if (ret != napi_ok) { - ZLOGD(LOG_LABEL, "OnRemoteRequest got exception. ret:%{public}d", ret); + ZLOGW(LOG_LABEL, "OnRemoteRequest got exception. ret:%{public}d", ret); param->result = ERR_UNKNOWN_TRANSACTION; break; } @@ -364,7 +364,7 @@ static void OnJsRemoteRequestCallBack(CallbackParam *param, std::string &desc) uint64_t curTime = static_cast(std::chrono::duration_cast( std::chrono::steady_clock::now().time_since_epoch()).count()); - ZLOGD(LOG_LABEL, "enter thread pool desc:%{public}s, time:%{public}" PRIu64, desc.c_str(), curTime); + ZLOGI(LOG_LABEL, "enter thread pool desc:%{public}s time:%{public}" PRIu64, desc.c_str(), curTime); NapiScope napiScope(param->env); if (!napiScope.IsValid()) { @@ -973,7 +973,6 @@ sptr NAPI_ohos_rpc_getNativeRemoteObject(napi_env env, napi_value return holder != nullptr ? holder->object_ : nullptr; } } - ZLOGW(LOG_LABEL, "napi object is nullptr"); return nullptr; }