From 935b86bb5913ab558b902276a76a28f1c78fb823 Mon Sep 17 00:00:00 2001 From: wujianlin Date: Thu, 27 Jun 2024 10:28:12 +0800 Subject: [PATCH] Reduces the log repetition rate Issue:https://gitee.com/openharmony/commonlibrary_c_utils/issues/IA8NMJ?from=project-issue Signed-off-by: wujianlin --- base/src/directory_ex.cpp | 2 +- base/src/refbase.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/base/src/directory_ex.cpp b/base/src/directory_ex.cpp index e8d8c78..4ddd646 100644 --- a/base/src/directory_ex.cpp +++ b/base/src/directory_ex.cpp @@ -421,7 +421,7 @@ bool PathToRealPath(const string& path, string& realPath) char tmpPath[PATH_MAX] = {0}; if (realpath(path.c_str(), tmpPath) == nullptr) { - UTILS_LOGE("path to realpath error: %{public}s", strerror(errno)); + UTILS_LOGE("path (%{public}s) to realpath error: %{public}s", path.c_str(), strerror(errno)); return false; } diff --git a/base/src/refbase.cpp b/base/src/refbase.cpp index dff86ab..fa0e354 100644 --- a/base/src/refbase.cpp +++ b/base/src/refbase.cpp @@ -244,7 +244,7 @@ int RefCounter::DecStrongRefCount(const void* objectId) int curCount = GetStrongRefCount(); if (curCount == INITIAL_PRIMARY_VALUE) { // unexpected case: there had never a strong reference. - UTILS_LOGF("decStrongRef when there is nerver a strong reference"); + UTILS_LOGD("decStrongRef when there is nerver a strong reference"); } else if (curCount > 0) { // we should update the current count here. // it may be changed after last operation. -- Gitee