diff --git a/frameworks/i18n/BUILD.gn b/frameworks/i18n/BUILD.gn index 56a13938ddc25af38718dc3efa4848df4e62b554..b995e9ed8e705710e97e46b61b8285d6f230ff48 100644 --- a/frameworks/i18n/BUILD.gn +++ b/frameworks/i18n/BUILD.gn @@ -59,12 +59,12 @@ if (defined(ohos_lite)) { "//third_party/bounds_checking_function:libsec_static", ] if (i18n_lite_support_i18n_product) { - include_dirs = [ "//commonlibrary/utils_lite/memory/include" ] - defines = [ "I18N_PRODUCT" ] - deps += [ - "//base/hiviewdfx/hilog_lite/frameworks/featured:hilog_shared", - "//commonlibrary/utils_lite:utils", + include_dirs = [ + "//base/hiviewdfx/hilog_lite/interfaces/native/kits/hilog_lite", + "//commonlibrary/utils_lite/memory/include", ] + defines = [ "I18N_PRODUCT" ] + deps += [ "//commonlibrary/utils_lite:utils" ] } } } else { diff --git a/frameworks/i18n/include/i18n_hilog_lite.h b/frameworks/i18n/include/i18n_hilog_lite.h deleted file mode 100644 index cfe8d562219cc8ddfb375f238702965c43be5f37..0000000000000000000000000000000000000000 --- a/frameworks/i18n/include/i18n_hilog_lite.h +++ /dev/null @@ -1,28 +0,0 @@ -/* - * Copyright (c) 2024 Huawei Device Co., Ltd. - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -#ifndef OHOS_GLOBAL_I18N_LITE_HILOG -#define OHOS_GLOBAL_I18N_LITE_HILOG - -#ifdef I18N_PRODUCT -#include "hilog/log.h" - -#ifdef HILOG_ERROR -#undef HILOG_ERROR -#endif - -static constexpr OHOS::HiviewDFX::HiLogLabel LOG_LABEL = {LOG_CORE, 0, "GlobalI18nLite"}; -#define HILOG_ERROR(...) (void)OHOS::HiviewDFX::HiLog::Error(LOG_LABEL, __VA_ARGS__) -#endif -#endif \ No newline at end of file diff --git a/frameworks/i18n/src/data_resource.cpp b/frameworks/i18n/src/data_resource.cpp index 53e5d9aedece17a84506016779339914e14bdf5c..e0fe5408cee77febfc3acb3b8d018b786ef0b997 100644 --- a/frameworks/i18n/src/data_resource.cpp +++ b/frameworks/i18n/src/data_resource.cpp @@ -17,7 +17,7 @@ #include #ifdef I18N_PRODUCT #include -#include "i18n_hilog_lite.h" +#include #endif #include "i18n_memory_adapter.h" #include "securec.h" @@ -152,7 +152,7 @@ bool DataResource::Init(void) int32_t infile = open(DATA_RESOURCE_PATH, O_RDONLY); if (infile < 0) { #ifdef I18N_PRODUCT - HILOG_ERROR("DataResource::Init: open DATA_RESOURCE_PATH failed, errno is %{public}d.", errno); + HILOG_ERROR(HILOG_MODULE_GLOBAL, "DataResource::Init: open DATA_RESOURCE_PATH failed, errno(%d)!", errno); #endif return false; }