From d5f0318b0a617ef283f85bca09c8a5fec01c2363 Mon Sep 17 00:00:00 2001 From: sodanotgreen Date: Tue, 30 Jul 2024 14:12:28 +0800 Subject: [PATCH] log Signed-off-by: sodanotgreen --- .../insight_intent/js_insight_intent.cpp | 4 ++-- .../js_insight_intent_driver.cpp | 2 +- .../insight_intent_executor.cpp | 4 ++-- .../insight_intent_executor_mgr.cpp | 10 +++++----- .../js_insight_intent_executor.cpp | 12 ++++++------ .../js_insight_intent_context.cpp | 2 +- .../src/insight_intent_execute_callback_proxy.cpp | 2 +- .../src/insight_intent_execute_callback_stub.cpp | 2 +- .../src/insight_intent_execute_manager.cpp | 12 ++++++------ .../abilitymgr/src/insight_intent_execute_param.cpp | 2 +- 10 files changed, 26 insertions(+), 26 deletions(-) diff --git a/frameworks/js/napi/insight_intent/insight_intent/js_insight_intent.cpp b/frameworks/js/napi/insight_intent/insight_intent/js_insight_intent.cpp index 4562819f7d..5823a86662 100644 --- a/frameworks/js/napi/insight_intent/insight_intent/js_insight_intent.cpp +++ b/frameworks/js/napi/insight_intent/insight_intent/js_insight_intent.cpp @@ -32,7 +32,7 @@ const uint8_t NUMBER_OF_PARAMETERS_THREE = 3; napi_value ExecuteModeInit(napi_env env) { if (env == nullptr) { - TAG_LOGE(AAFwkTag::INTENT, "Invalid input parameters"); + TAG_LOGE(AAFwkTag::INTENT, "null env"); return nullptr; } napi_value objValue = nullptr; @@ -54,7 +54,7 @@ napi_value JsInsightIntentInit(napi_env env, napi_value exportObj) { TAG_LOGD(AAFwkTag::INTENT, "called"); if (env == nullptr || exportObj == nullptr) { - TAG_LOGE(AAFwkTag::INTENT, "Invalid input parameters"); + TAG_LOGE(AAFwkTag::INTENT, "null env or exportObj"); return nullptr; } diff --git a/frameworks/js/napi/insight_intent/insight_intent_driver/js_insight_intent_driver.cpp b/frameworks/js/napi/insight_intent/insight_intent_driver/js_insight_intent_driver.cpp index 959c4dde46..1bbf44e136 100644 --- a/frameworks/js/napi/insight_intent/insight_intent_driver/js_insight_intent_driver.cpp +++ b/frameworks/js/napi/insight_intent/insight_intent_driver/js_insight_intent_driver.cpp @@ -96,7 +96,7 @@ private: { TAG_LOGD(AAFwkTag::INTENT, "called"); if (info.argc < ARGC_ONE) { - TAG_LOGE(AAFwkTag::INTENT, "Params not match"); + TAG_LOGE(AAFwkTag::INTENT, "invalid argc"); ThrowTooFewParametersError(env); return CreateJsUndefined(env); } diff --git a/frameworks/native/ability/native/insight_intent_executor/insight_intent_executor.cpp b/frameworks/native/ability/native/insight_intent_executor/insight_intent_executor.cpp index b5c7dbebb9..542ec780fc 100644 --- a/frameworks/native/ability/native/insight_intent_executor/insight_intent_executor.cpp +++ b/frameworks/native/ability/native/insight_intent_executor/insight_intent_executor.cpp @@ -23,7 +23,7 @@ namespace OHOS::AbilityRuntime { std::shared_ptr InsightIntentExecutor::Create(Runtime& runtime) { - TAG_LOGD(AAFwkTag::INTENT, "InsightIntentExecutor Create runtime"); + TAG_LOGD(AAFwkTag::INTENT, "called"); switch (runtime.GetLanguage()) { case Runtime::Language::JS: return static_cast>(JsInsightIntentExecutor::Create( @@ -37,7 +37,7 @@ bool InsightIntentExecutor::Init(const InsightIntentExecutorInfo& intentInfo) { auto executeParam = intentInfo.executeParam; if (executeParam == nullptr) { - TAG_LOGE(AAFwkTag::INTENT, "executeParam is nullptr"); + TAG_LOGE(AAFwkTag::INTENT, "null executeParam"); return false; } diff --git a/frameworks/native/ability/native/insight_intent_executor/insight_intent_executor_mgr.cpp b/frameworks/native/ability/native/insight_intent_executor/insight_intent_executor_mgr.cpp index 5bdfd9e671..8fcbd977db 100644 --- a/frameworks/native/ability/native/insight_intent_executor/insight_intent_executor_mgr.cpp +++ b/frameworks/native/ability/native/insight_intent_executor/insight_intent_executor_mgr.cpp @@ -22,12 +22,12 @@ namespace OHOS { namespace AbilityRuntime { InsightIntentExecutorMgr::InsightIntentExecutorMgr() { - TAG_LOGD(AAFwkTag::INTENT, "constructor"); + TAG_LOGD(AAFwkTag::INTENT, "called"); } InsightIntentExecutorMgr::~InsightIntentExecutorMgr() { - TAG_LOGI(AAFwkTag::INTENT, "deconstructor"); + TAG_LOGI(AAFwkTag::INTENT, "called"); } bool InsightIntentExecutorMgr::ExecuteInsightIntent(Runtime& runtime, const InsightIntentExecutorInfo& executeInfo, @@ -36,7 +36,7 @@ bool InsightIntentExecutorMgr::ExecuteInsightIntent(Runtime& runtime, const Insi TAG_LOGD(AAFwkTag::INTENT, "called"); auto executeParam = executeInfo.executeParam; if (executeParam == nullptr || executeParam->insightIntentParam_ == nullptr) { - TAG_LOGE(AAFwkTag::INTENT, "executeParam == nullptr or insightIntentParam_ == nullptr"); + TAG_LOGE(AAFwkTag::INTENT, "null executeParam or insightIntentParam_"); TriggerCallbackInner(std::move(callback), static_cast(AbilityErrorCode::ERROR_CODE_INVALID_PARAM)); return false; } @@ -47,7 +47,7 @@ bool InsightIntentExecutorMgr::ExecuteInsightIntent(Runtime& runtime, const Insi TAG_LOGD(AAFwkTag::INTENT, "called"); auto executorMgr = weak.lock(); if (executorMgr == nullptr) { - TAG_LOGE(AAFwkTag::INTENT, "executorMgr == nullptr"); + TAG_LOGE(AAFwkTag::INTENT, "null executorMgr"); return; } executorMgr->RemoveInsightIntentExecutor(intentId); @@ -57,7 +57,7 @@ bool InsightIntentExecutorMgr::ExecuteInsightIntent(Runtime& runtime, const Insi // Create insight intent executor auto intentExecutor = InsightIntentExecutor::Create(runtime); if (intentExecutor == nullptr) { - TAG_LOGE(AAFwkTag::INTENT, "intentExecutor == nullptr"); + TAG_LOGE(AAFwkTag::INTENT, "null intentExecutor"); TriggerCallbackInner(std::move(callback), static_cast(AbilityErrorCode::ERROR_CODE_INVALID_PARAM)); return false; } diff --git a/frameworks/native/ability/native/insight_intent_executor/js_insight_intent_executor.cpp b/frameworks/native/ability/native/insight_intent_executor/js_insight_intent_executor.cpp index 433f5b33ae..4b0420c6b4 100644 --- a/frameworks/native/ability/native/insight_intent_executor/js_insight_intent_executor.cpp +++ b/frameworks/native/ability/native/insight_intent_executor/js_insight_intent_executor.cpp @@ -51,7 +51,7 @@ JsInsightIntentExecutor::JsInsightIntentExecutor(JsRuntime& runtime) : runtime_( JsInsightIntentExecutor::~JsInsightIntentExecutor() { state_ = State::DESTROYED; - TAG_LOGI(AAFwkTag::INTENT, "JsInsightIntentExecutor destructor"); + TAG_LOGI(AAFwkTag::INTENT, "called"); } bool JsInsightIntentExecutor::Init(const InsightIntentExecutorInfo& insightIntentInfo) @@ -64,26 +64,26 @@ bool JsInsightIntentExecutor::Init(const InsightIntentExecutorInfo& insightInten HandleScope handleScope(runtime_); jsObj_ = JsInsightIntentExecutor::LoadJsCode(insightIntentInfo, runtime_); if (jsObj_ == nullptr) { - TAG_LOGE(AAFwkTag::INTENT, "jsObj_ is nullptr"); + TAG_LOGE(AAFwkTag::INTENT, "null jsObj_"); STATE_PATTERN_NAIVE_STATE_SET_AND_RETURN(State::INVALID, false); } auto env = runtime_.GetNapiEnv(); if (env == nullptr) { - TAG_LOGE(AAFwkTag::INTENT, "env == nullptr"); + TAG_LOGE(AAFwkTag::INTENT, "null env"); STATE_PATTERN_NAIVE_STATE_SET_AND_RETURN(State::INVALID, false); } auto context = GetContext(); if (context == nullptr) { - TAG_LOGE(AAFwkTag::INTENT, "Context is nullptr"); + TAG_LOGE(AAFwkTag::INTENT, "null Context"); STATE_PATTERN_NAIVE_STATE_SET_AND_RETURN(State::INVALID, false); } napi_value contextObj = CreateJsInsightIntentContext(env, context); contextObj_ = JsRuntime::LoadSystemModuleByEngine(env, "app.ability.InsightIntentContext", &contextObj, 1); if (contextObj_ == nullptr) { - TAG_LOGE(AAFwkTag::INTENT, "contextObj_ == nullptr"); + TAG_LOGE(AAFwkTag::INTENT, "null contextObj_"); STATE_PATTERN_NAIVE_STATE_SET_AND_RETURN(State::INVALID, false); } @@ -167,7 +167,7 @@ std::unique_ptr JsInsightIntentExecutor::LoadJsCode( TAG_LOGD(AAFwkTag::INTENT, "called"); auto executeParam = info.executeParam; if (executeParam == nullptr) { - TAG_LOGE(AAFwkTag::INTENT, "executeParam == nullptr"); + TAG_LOGE(AAFwkTag::INTENT, "null executeParam"); return std::unique_ptr(); } diff --git a/frameworks/native/insight_intent/insight_intent_context/js_insight_intent_context.cpp b/frameworks/native/insight_intent/insight_intent_context/js_insight_intent_context.cpp index 6294ba4659..e424e1b61e 100644 --- a/frameworks/native/insight_intent/insight_intent_context/js_insight_intent_context.cpp +++ b/frameworks/native/insight_intent/insight_intent_context/js_insight_intent_context.cpp @@ -119,7 +119,7 @@ napi_value CreateJsInsightIntentContext(napi_env env, const std::shared_ptr remote = Remote(); if (remote == nullptr) { - TAG_LOGE(AAFwkTag::INTENT, "remote == nullptr"); + TAG_LOGE(AAFwkTag::INTENT, "null remote"); return; } diff --git a/services/abilitymgr/src/insight_intent_execute_callback_stub.cpp b/services/abilitymgr/src/insight_intent_execute_callback_stub.cpp index 7fdbf04436..3a9ef74d48 100644 --- a/services/abilitymgr/src/insight_intent_execute_callback_stub.cpp +++ b/services/abilitymgr/src/insight_intent_execute_callback_stub.cpp @@ -46,7 +46,7 @@ int32_t InsightIntentExecuteCallbackStub::OnExecuteDoneInner(MessageParcel &data std::shared_ptr executeResult( data.ReadParcelable()); if (executeResult == nullptr) { - TAG_LOGE(AAFwkTag::INTENT, "executeResult is nullptr"); + TAG_LOGE(AAFwkTag::INTENT, "null executeResult"); return ERR_INVALID_VALUE; } OnExecuteDone(key, resultCode, *executeResult); diff --git a/services/abilitymgr/src/insight_intent_execute_manager.cpp b/services/abilitymgr/src/insight_intent_execute_manager.cpp index 02f1a51abf..319a2e1186 100644 --- a/services/abilitymgr/src/insight_intent_execute_manager.cpp +++ b/services/abilitymgr/src/insight_intent_execute_manager.cpp @@ -38,7 +38,7 @@ void InsightIntentExecuteRecipient::OnRemoteDied(const wptr TAG_LOGD(AAFwkTag::INTENT, "InsightIntentExecuteRecipient OnRemoteDied, %{public}" PRIu64, intentId_); auto object = remote.promote(); if (object == nullptr) { - TAG_LOGE(AAFwkTag::INTENT, "remote object is nullptr"); + TAG_LOGE(AAFwkTag::INTENT, "null remote object"); return; } DelayedSingleton::GetInstance()->RemoteDied(intentId_); @@ -56,11 +56,11 @@ int32_t InsightIntentExecuteManager::CheckAndUpdateParam(uint64_t key, const spt return result; } if (callerToken == nullptr) { - TAG_LOGE(AAFwkTag::INTENT, "callerToken is nullptr"); + TAG_LOGE(AAFwkTag::INTENT, "null callerToken"); return ERR_INVALID_VALUE; } if (param == nullptr) { - TAG_LOGE(AAFwkTag::INTENT, "param is nullptr"); + TAG_LOGE(AAFwkTag::INTENT, "null param"); return ERR_INVALID_VALUE; } if (param->bundleName_.empty() || param->moduleName_.empty() || param->abilityName_.empty() || @@ -93,7 +93,7 @@ int32_t InsightIntentExecuteManager::CheckAndUpdateWant(Want &want, ExecuteMode auto srcEntry = AbilityRuntime::InsightIntentUtils::GetSrcEntry(elementName.GetBundleName(), elementName.GetModuleName(), want.GetStringParam(INSIGHT_INTENT_EXECUTE_PARAM_NAME)); if (srcEntry.empty()) { - TAG_LOGE(AAFwkTag::INTENT, "srcEntry is empty"); + TAG_LOGE(AAFwkTag::INTENT, "empty srcEntry"); return ERR_INVALID_VALUE; } want.SetParam(INSIGHT_INTENT_SRC_ENTRY, srcEntry); @@ -208,7 +208,7 @@ int32_t InsightIntentExecuteManager::GenerateWant( const std::shared_ptr ¶m, Want &want) { if (param == nullptr) { - TAG_LOGE(AAFwkTag::INTENT, "param is nullptr"); + TAG_LOGE(AAFwkTag::INTENT, "null param"); return ERR_INVALID_VALUE; } want.SetElementName("", param->bundleName_, param->abilityName_, param->moduleName_); @@ -251,7 +251,7 @@ int32_t InsightIntentExecuteManager::IsValidCall(const Want &want) { std::string insightIntentName = want.GetStringParam(INSIGHT_INTENT_EXECUTE_PARAM_NAME); if (insightIntentName.empty()) { - TAG_LOGE(AAFwkTag::INTENT, "insightIntentName is empty"); + TAG_LOGE(AAFwkTag::INTENT, "empty insightIntentName"); return ERR_INVALID_VALUE; } TAG_LOGD(AAFwkTag::INTENT, "insightIntentName: %{public}s", insightIntentName.c_str()); diff --git a/services/abilitymgr/src/insight_intent_execute_param.cpp b/services/abilitymgr/src/insight_intent_execute_param.cpp index e118af3ebd..e24e86cf15 100644 --- a/services/abilitymgr/src/insight_intent_execute_param.cpp +++ b/services/abilitymgr/src/insight_intent_execute_param.cpp @@ -79,7 +79,7 @@ bool InsightIntentExecuteParam::GenerateFromWant(const AAFwk::Want &want, { const WantParams &wantParams = want.GetParams(); if (!wantParams.HasParam(INSIGHT_INTENT_EXECUTE_PARAM_NAME)) { - TAG_LOGE(AAFwkTag::INTENT, "The want is empty"); + TAG_LOGE(AAFwkTag::INTENT, "empty want"); return false; }