diff --git a/services/distributeddataservice/service/kvdb/kvdb_general_store.cpp b/services/distributeddataservice/service/kvdb/kvdb_general_store.cpp index b2fab36ce1372baebde812d824559fdba10e5cac..6c8f92afa0025437caa13ba371a5afb81cfd5c1a 100644 --- a/services/distributeddataservice/service/kvdb/kvdb_general_store.cpp +++ b/services/distributeddataservice/service/kvdb/kvdb_general_store.cpp @@ -467,16 +467,18 @@ void KVDBGeneralStore::SetEqualIdentifier(const std::string &appId, const std::s auto accountId = account.empty() ? AccountDelegate::GetInstance()->GetUnencryptedAccountId() : account; auto convertedIds = AppIdMappingConfigManager::GetInstance().Convert(appId, accountId); auto identifier = KvManager::GetKvStoreIdentifier(convertedIds.second, convertedIds.first, storeId); - ZLOGI("same account store:%{public}s, user:%{public}s, device:%{public}.10s, appId:%{public}s", + ZLOGI("same account store:%{public}s, user:%{public}s, device:%{public}s, appId:%{public}s", Anonymous::Change(storeId).c_str(), Anonymous::Change(convertedIds.second).c_str(), - DistributedData::Serializable::Marshall(sameAccountDevs).c_str(), convertedIds.first.c_str()); + Anonymous::Change(DistributedData::Serializable::Marshall(sameAccountDevs)).c_str(), + convertedIds.first.c_str()); delegate_->SetEqualIdentifier(identifier, sameAccountDevs); } if (!defaultAccountDevs.empty()) { auto convertedIds = AppIdMappingConfigManager::GetInstance().Convert(appId, defaultAccountId); auto identifier = KvManager::GetKvStoreIdentifier(convertedIds.second, convertedIds.first, storeId); - ZLOGI("no account store:%{public}s, device:%{public}.10s, appId:%{public}s", Anonymous::Change(storeId).c_str(), - DistributedData::Serializable::Marshall(defaultAccountDevs).c_str(), convertedIds.first.c_str()); + ZLOGI("no account store:%{public}s, device:%{public}s, appId:%{public}s", Anonymous::Change(storeId).c_str(), + Anonymous::Change(DistributedData::Serializable::Marshall(defaultAccountDevs)).c_str(), + convertedIds.first.c_str()); delegate_->SetEqualIdentifier(identifier, defaultAccountDevs); } } diff --git a/services/distributeddataservice/service/kvdb/query_helper.cpp b/services/distributeddataservice/service/kvdb/query_helper.cpp index f877df1f2a845ce36cc2878b0c2fbf21560d6ab4..c1bd2d6c0b554e168526edc179a9f84567b0c237 100644 --- a/services/distributeddataservice/service/kvdb/query_helper.cpp +++ b/services/distributeddataservice/service/kvdb/query_helper.cpp @@ -21,6 +21,7 @@ #include "kvstore_utils.h" #include "log_print.h" #include "types.h" +#include "utils/anonymous.h" namespace OHOS::DistributedKv { constexpr int QUERY_SKIP_SIZE = 1; constexpr int QUERY_WORD_SIZE = 2; @@ -559,7 +560,7 @@ bool QueryHelper::HandleInKeys(const std::vector &words, int &point const std::vector inKeys = GetStringList(words, inkeyOffSet, end); std::set> inDbKeys; for (const std::string &inKey : inKeys) { - ZLOGI("inKey=%{public}s", inKey.c_str()); + ZLOGI("inKey=%{public}s", DistributedData::Anonymous::Change(inKey).c_str()); std::vector dbKey; dbKey.assign(inKey.begin(), inKey.end()); inDbKeys.insert(dbKey);