From 45e9d4184f8717875f8516d7cab443156c2014c7 Mon Sep 17 00:00:00 2001 From: zhang-daiyue Date: Tue, 30 Jan 2024 12:08:07 +0800 Subject: [PATCH] Fix error log print level, add errno message Signed-off-by: zhang-daiyue Change-Id: If715d20158f86e4daf18aac4a20ca04ecda96947 --- 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 77dddb7..4d530ae 100644 --- a/base/src/directory_ex.cpp +++ b/base/src/directory_ex.cpp @@ -398,13 +398,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}d, path: %{private}s", errno, path.c_str()); 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 error: %{public}d path: (%{private}s)", errno, realPath.c_str()); return false; } return true; -- Gitee