From 41ca83bcbdb8fcbd245a6fab2a8348d4082c871f Mon Sep 17 00:00:00 2001 From: liqiang Date: Thu, 4 Aug 2022 21:13:06 +0800 Subject: [PATCH] IssueNo:https://gitee.com/openharmony/notification_common_event_service/issues/I5KSA9 Description:fix notification log failed bug Sig: SIG_ApplicationFramework Feature or Bugfix:Bugfix Binary Source:No Signed-off-by: liqiang Change-Id: I50a7156bf17e6dd7dbff633ae8c383bf4e4e0bfa --- frameworks/core/common/include/ans_log_wrapper.h | 10 +++++----- frameworks/js/napi/BUILD.gn | 5 ----- frameworks/js/napi/src/reminder/BUILD.gn | 5 ----- services/ans/BUILD.gn | 4 ---- test/common/acts/actsnotificationfuzztest/BUILD.gn | 4 ---- test/resource/ansSTSlotGroupTest/BUILD.gn | 5 ----- 6 files changed, 5 insertions(+), 28 deletions(-) diff --git a/frameworks/core/common/include/ans_log_wrapper.h b/frameworks/core/common/include/ans_log_wrapper.h index 05a493cd7..a33785f1a 100644 --- a/frameworks/core/common/include/ans_log_wrapper.h +++ b/frameworks/core/common/include/ans_log_wrapper.h @@ -23,18 +23,18 @@ namespace OHOS { namespace Notification { -#ifndef LOG_DOMAIN -#define LOG_DOMAIN 0xD001800 +#ifndef ANS_LOG_DOMAIN +#define ANS_LOG_DOMAIN 0xD001200 #endif #ifndef ANS_LOG_TAG -#define ANS_LOG_TAG "NOTIFICATION" +#define ANS_LOG_TAG "Ans" #endif enum class AnsLogLevel : uint8_t { DEBUG = 0, INFO, WARN, ERROR, FATAL }; -static constexpr OHOS::HiviewDFX::HiLogLabel ANS_LABEL = {LOG_CORE, LOG_DOMAIN, ANS_LOG_TAG}; -static constexpr OHOS::HiviewDFX::HiLogLabel ANS_REMINDER_LABEL = {LOG_CORE, LOG_DOMAIN, "ANS_REMINDER"}; +static constexpr OHOS::HiviewDFX::HiLogLabel ANS_LABEL = {LOG_CORE, ANS_LOG_DOMAIN, ANS_LOG_TAG}; +static constexpr OHOS::HiviewDFX::HiLogLabel ANS_REMINDER_LABEL = {LOG_CORE, ANS_LOG_DOMAIN, "ANS_REMINDER"}; class AnsLogWrapper { public: diff --git a/frameworks/js/napi/BUILD.gn b/frameworks/js/napi/BUILD.gn index 66e861db5..4e3002c18 100644 --- a/frameworks/js/napi/BUILD.gn +++ b/frameworks/js/napi/BUILD.gn @@ -32,11 +32,6 @@ config("native_module_config") { if (target_cpu == "arm") { cflags += [ "-DBINDER_IPC_32BIT" ] } - - defines = [ - "ANS_LOG_TAG = \"NOTIFICATION_NAPI\"", - "LOG_DOMAIN = 0xD001800", - ] } ohos_shared_library("notification") { diff --git a/frameworks/js/napi/src/reminder/BUILD.gn b/frameworks/js/napi/src/reminder/BUILD.gn index ce267f591..e21dd4c06 100644 --- a/frameworks/js/napi/src/reminder/BUILD.gn +++ b/frameworks/js/napi/src/reminder/BUILD.gn @@ -24,11 +24,6 @@ config("native_module_config") { if (target_cpu == "arm") { cflags += [ "-DBINDER_IPC_32BIT" ] } - - defines = [ - "APP_LOG_TAG = \"NOTIFICATION_REMINDER\"", - "LOG_DOMAIN = 0xD001800", - ] } ohos_shared_library("reminderagent") { diff --git a/services/ans/BUILD.gn b/services/ans/BUILD.gn index cdf752d7e..bdc4f587a 100644 --- a/services/ans/BUILD.gn +++ b/services/ans/BUILD.gn @@ -20,10 +20,6 @@ group("ans_targets") { config("public_ans_config") { include_dirs = [ "${services_path}/ans/include" ] - defines = [ - "ANS_LOG_TAG = \"NOTIFICATION_SERVICE\"", - "LOG_DOMAIN = 0xD002200", - ] } ohos_shared_library("libans") { diff --git a/test/common/acts/actsnotificationfuzztest/BUILD.gn b/test/common/acts/actsnotificationfuzztest/BUILD.gn index 2026181f2..4d93e7593 100644 --- a/test/common/acts/actsnotificationfuzztest/BUILD.gn +++ b/test/common/acts/actsnotificationfuzztest/BUILD.gn @@ -60,10 +60,6 @@ ohos_systemtest("ActsNotificationFuzzTest") { "//utils/native/base:utils", ] - defines = [ - "ANS_LOG_TAG = \"AnsFwkKitsTest\"", - "LOG_DOMAIN = 0xD002200", - ] external_deps = [ "ability_base:base", "ability_base:want", diff --git a/test/resource/ansSTSlotGroupTest/BUILD.gn b/test/resource/ansSTSlotGroupTest/BUILD.gn index a1afa13ed..77f7eb83d 100644 --- a/test/resource/ansSTSlotGroupTest/BUILD.gn +++ b/test/resource/ansSTSlotGroupTest/BUILD.gn @@ -30,11 +30,6 @@ config("ansSTSlotGroupTestConfig") { "${ability_runtime_services_path}/abilitymgr/include", "${inner_api_path}", ] - - defines = [ - "APP_LOG_TAG = \"ansSTSlotGroupTest\"", - "LOG_DOMAIN = 0xD002200", - ] } ohos_shared_library("libraryAnsSTSlotGroupTest") { -- Gitee