diff --git a/services/distributeddataservice/service/data_share/data_share_profile_config.cpp b/services/distributeddataservice/service/data_share/data_share_profile_config.cpp index f8fe350040fa7babd603a375b69eca1f9b1cb832..ad9cf2077d1bafba3f640b7ed2e34ca9804faa1d 100644 --- a/services/distributeddataservice/service/data_share/data_share_profile_config.cpp +++ b/services/distributeddataservice/service/data_share/data_share_profile_config.cpp @@ -280,7 +280,7 @@ std::string DataShareProfileConfig::GetResFromResMgr( } std::string profile = ReadProfile(resPath); if (profile.empty()) { - ZLOGE("Read profile failed, resPath is %{public}s", resPath.c_str()); + ZLOGE("Read profile failed, resPath is %{public}s", URIUtils::Anonymous(resPath).c_str()); return profileInfo; } return profile; @@ -292,7 +292,8 @@ bool DataShareProfileConfig::IsFileExisted(const std::string &filePath) return false; } if (access(filePath.c_str(), F_OK) != 0) { - ZLOGE("can not access file, errno is %{public}d, filePath is %{public}s", errno, filePath.c_str()); + ZLOGE("can not access file, errno is %{public}d, filePath is %{public}s", errno, + URIUtils::Anonymous(filePath).c_str()); return false; } return true; @@ -313,7 +314,7 @@ std::string DataShareProfileConfig::ReadProfile(const std::string &resPath) tmp << in.rdbuf(); std::string content = tmp.str(); if (content.empty()) { - ZLOGE("the file is empty, resPath is %{public}s", resPath.c_str()); + ZLOGE("the file is empty, resPath is %{public}s", URIUtils::Anonymous(resPath).c_str()); return ""; } return content;