diff --git a/frameworks/resmgr_lite/BUILD.gn b/frameworks/resmgr_lite/BUILD.gn index 9b0dcf263ff5f597addfe4eece8c949f1e35467f..299cf844b3015849d51967132ab486819e799509 100644 --- a/frameworks/resmgr_lite/BUILD.gn +++ b/frameworks/resmgr_lite/BUILD.gn @@ -55,6 +55,9 @@ config("global_resmgr_config") { "//utils/native/lite/memory", "//base/global/i18n_lite/interfaces/kits/i18n/include/", ] + } else if (ohos_kernel_type == "linux") { + include_dirs += + [ "//base/hiviewdfx/hilog_lite/interfaces/native/kits/hilog" ] } } @@ -82,7 +85,10 @@ if (defined(ohos_lite)) { static_library("global_resmgr") { sources = global_sources public_configs = [ ":global_resmgr_config" ] - deps = [ "//third_party/bounds_checking_function:libsec_static" ] + deps = [ + "//base/hiviewdfx/hilog_lite/frameworks/featured:hilog_static", + "//third_party/bounds_checking_function:libsec_static", + ] } } else { shared_library("global_resmgr") { diff --git a/frameworks/resmgr_lite/src/global.c b/frameworks/resmgr_lite/src/global.c index 4b0e73f6630bfe0d6a51f56befb523bc47dde147..9d5e1914e3e66642886f5137d530184f2e07b7ff 100644 --- a/frameworks/resmgr_lite/src/global.c +++ b/frameworks/resmgr_lite/src/global.c @@ -24,6 +24,7 @@ #include #include "global_utils.h" +#include "log.h" /* * locale format as below, use '-' or '_' to link, e.g. en_Latn_US @@ -172,6 +173,7 @@ static int32_t GLOBAL_GetValueByIdInternal(uint32_t id, const char *path, const if (idHeader.idParams[i].id == id) { ret = utilsImpl->GetIdItem(file, idHeader.idParams[i].offset, &idItem); if (ret != MC_SUCCESS) { + HILOG_ERROR(1, "GLOBAL_GetValueByIdInternal failed to get idiItem"); close(file); free(idHeader.idParams); return ret;