From 38883d7211b7c2d99c606d9f8d7261540b6b87cf Mon Sep 17 00:00:00 2001 From: chenkeyu Date: Fri, 12 Apr 2024 09:45:16 +0800 Subject: [PATCH] Change log level for PathToRealPath in directory module Issue:https://gitee.com/openharmony/commonlibrary_c_utils/issues/I9G0ME?from=project-issue Signed-off-by: chenkeyu --- base/src/directory_ex.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/base/src/directory_ex.cpp b/base/src/directory_ex.cpp index b5ac745..e8d8c78 100644 --- a/base/src/directory_ex.cpp +++ b/base/src/directory_ex.cpp @@ -421,13 +421,13 @@ bool PathToRealPath(const string& path, string& realPath) char tmpPath[PATH_MAX] = {0}; if (realpath(path.c_str(), tmpPath) == nullptr) { - UTILS_LOGD("path to realpath error"); + UTILS_LOGE("path to realpath error: %{public}s", strerror(errno)); return false; } realPath = tmpPath; if (access(realPath.c_str(), F_OK) != 0) { - UTILS_LOGD("check realpath (%{private}s) error", realPath.c_str()); + UTILS_LOGE("check realpath (%{private}s) error: %{public}s", realPath.c_str(), strerror(errno)); return false; } return true; -- Gitee