已合并
增加detail维测日志 #2212
已合并
rainlost创建于 7月21日
共 6 个文件变更+17-7
@@ -14,6 +14,7 @@
14 */14 */
15 15 
16#include "module_ipc/sa_backup_connection.h"16#include "module_ipc/sa_backup_connection.h"
17+#include "b_anony/b_anony.h"
17#include "b_error/b_error.h"18#include "b_error/b_error.h"
18#include "b_error/b_excep_utils.h"19#include "b_error/b_excep_utils.h"
19#include "filemgmt_libhilog.h"20#include "filemgmt_libhilog.h"
@@ -139,6 +140,8 @@ ErrCode SABackupConnection::LoadBackupSAExtInner()
139 140 
140bool SABackupConnection::InputParaSet(MessageParcel &data)141bool SABackupConnection::InputParaSet(MessageParcel &data)
141{142{
143+ HILOGI("SA:%{public}d, extInfo:%{public}s, extInfo size:%{public}zu", saId_,
144+ GetAnonyString(extInfo_).c_str(), extInfo_.size());
142 if (extension_ == BConstants::EXTENSION_BACKUP) {145 if (extension_ == BConstants::EXTENSION_BACKUP) {
143 if (!data.WriteString(extInfo_)) {146 if (!data.WriteString(extInfo_)) {
144 HILOGE("InputParaSet WriteString failed sa: %{public}d, extInfo: %{public}s, extension: %{public}s",147 HILOGE("InputParaSet WriteString failed sa: %{public}d, extInfo: %{public}s, extension: %{public}s",
@@ -545,8 +545,8 @@ void Service::HandleCurGroupIncBackupInfos(vector<BJsonEntityCaps::BundleInfo> &
545 }545 }
546 BJsonUtil::BundleDetailInfo uniCastInfo;546 BJsonUtil::BundleDetailInfo uniCastInfo;
547 if (BJsonUtil::FindBundleInfoByName(bundleNameDetailMap, bundleNameIndexInfo, UNICAST_TYPE, uniCastInfo)) {547 if (BJsonUtil::FindBundleInfoByName(bundleNameDetailMap, bundleNameIndexInfo, UNICAST_TYPE, uniCastInfo)) {
548- HILOGI("current bundle:%{public}s, unicast info:%{public}s", bundleNameIndexInfo.c_str(),548+ HILOGI("current bundle:%{public}s, unicast info:%{public}s, unicast info size:%{public}zu",
549- GetAnonyString(uniCastInfo.detail).c_str());549+ bundleNameIndexInfo.c_str(), GetAnonyString(uniCastInfo.detail).c_str(), uniCastInfo.detail.size());
550 session_->SetBackupExtInfo(bundleNameIndexInfo, uniCastInfo.detail);550 session_->SetBackupExtInfo(bundleNameIndexInfo, uniCastInfo.detail);
551 }551 }
552 session_->SetBackupExtName(bundleNameIndexInfo, info.extensionName);552 session_->SetBackupExtName(bundleNameIndexInfo, info.extensionName);
@@ -1150,8 +1150,8 @@ void Service::SendUserIdToApp(string &bundleName, int32_t userId)
1150 return;1150 return;
1151 }1151 }
1152 session_->SetBackupExtInfo(bundleName, detailInfo);1152 session_->SetBackupExtInfo(bundleName, detailInfo);
1153- HILOGI("End, bundleName:%{public}s, unicast info:%{public}s", bundleName.c_str(),1153+ HILOGI("End, bundleName:%{public}s, unicast info:%{public}s, unicast info size:%{public}zu", bundleName.c_str(),
1154- GetAnonyString(detailInfo).c_str());1154+ GetAnonyString(detailInfo).c_str(), detailInfo.size());
1155}1155}
1156 1156 
1157void Service::SetCurrentBackupSessProperties(const vector<string> &bundleNames, int32_t userId,1157void Service::SetCurrentBackupSessProperties(const vector<string> &bundleNames, int32_t userId,
@@ -589,7 +589,8 @@ void Service::SetWant(AAFwk::Want &want, const BundleName &bundleName, const BCo
589 int64_t versionCode = session_->GetBundleVersionCode(bundleName); /* old device app version code */589 int64_t versionCode = session_->GetBundleVersionCode(bundleName); /* old device app version code */
590 RestoreTypeEnum restoreType = session_->GetBundleRestoreType(bundleName); /* app restore type */590 RestoreTypeEnum restoreType = session_->GetBundleRestoreType(bundleName); /* app restore type */
591 string bundleExtInfo = session_->GetBackupExtInfo(bundleName);591 string bundleExtInfo = session_->GetBackupExtInfo(bundleName);
592- HILOGI("BundleExtInfo is:%{public}s", GetAnonyString(bundleExtInfo).c_str());592+ HILOGI("BundleExtInfo is:%{public}s, BundleExtInfo size:%{public}zu", GetAnonyString(bundleExtInfo).c_str(),
593+ bundleExtInfo.size());
593 string oldBackupVersion = session_->GetOldBackupVersion(); /* old device backup version */594 string oldBackupVersion = session_->GetOldBackupVersion(); /* old device backup version */
594 if (oldBackupVersion.empty()) {595 if (oldBackupVersion.empty()) {
595 HILOGE("Failed to get backupVersion of old device");596 HILOGE("Failed to get backupVersion of old device");
@@ -642,6 +642,8 @@ void SvcSessionManager::SetBackupExtInfo(const string &bundleName, const string
642 return;642 return;
643 }643 }
644 it->second.extInfo = extInfo;644 it->second.extInfo = extInfo;
645+ HILOGI("bundleName:%{public}s, extInfo:%{public}s, extInfo size:%{public}zu", bundleName.c_str(),
646+ GetAnonyString(extInfo).c_str(), extInfo.size());
645}647}
646 648 
647std::string SvcSessionManager::GetBackupExtInfo(const string &bundleName)649std::string SvcSessionManager::GetBackupExtInfo(const string &bundleName)
@@ -144,8 +144,8 @@ void RestoreExtraPropertyStrategy::Execute(StrategyContext &context)
144 BJsonUtil::BundleDetailInfo uniCastInfo;144 BJsonUtil::BundleDetailInfo uniCastInfo;
145 if (BJsonUtil::FindBundleInfoByName(*context.bundleNameDetailMap,145 if (BJsonUtil::FindBundleInfoByName(*context.bundleNameDetailMap,
146 context.bundleNameIndexInfo, UNICAST_TYPE, uniCastInfo)) {146 context.bundleNameIndexInfo, UNICAST_TYPE, uniCastInfo)) {
147- HILOGI("current bundle:%{public}s, unicast info:%{public}s",147+ HILOGI("current bundle:%{public}s, unicast info:%{public}s, unicast info size:%{public}zu",
148- context.bundleNameIndexInfo.c_str(), GetAnonyString(uniCastInfo.detail).c_str());148+ context.bundleNameIndexInfo.c_str(), GetAnonyString(uniCastInfo.detail).c_str(), uniCastInfo.detail.size());
149 ptr->SetBackupExtInfo(context.bundleNameIndexInfo, uniCastInfo.detail);149 ptr->SetBackupExtInfo(context.bundleNameIndexInfo, uniCastInfo.detail);
150 }150 }
151}151}
@@ -21,6 +21,7 @@
21#include <sstream>21#include <sstream>
22#include "cJSON.h"22#include "cJSON.h"
23 23 
24+#include "b_anony/b_anony.h"
24#include "b_error/b_error.h"25#include "b_error/b_error.h"
25#include "b_resources/b_constants.h"26#include "b_resources/b_constants.h"
26#include "filemgmt_libhilog.h"27#include "filemgmt_libhilog.h"
@@ -199,6 +200,9 @@ static void InsertBundleDetailInfo(cJSON *infos, int infosCount,
199 return;200 return;
200 }201 }
201 bundleDetailInfo.detail = std::string(detailInfos);202 bundleDetailInfo.detail = std::string(detailInfos);
203+ HILOGI("bundleName:%{public}s, type:%{public}s, detail:%{public}s, detail size:%{public}zu",
204+ bundleDetailInfo.bundleName.c_str(), bundleDetailInfo.type.c_str(),
205+ GetAnonyString(bundleDetailInfo.detail).c_str(), bundleDetailInfo.detail.size());
202 if (bundleDetailInfo.type.compare(BConstants::BROADCAST_TYPE) == 0) {206 if (bundleDetailInfo.type.compare(BConstants::BROADCAST_TYPE) == 0) {
203 ParseBroadcastInfo(bundleDetailInfo, infoItem);207 ParseBroadcastInfo(bundleDetailInfo, infoItem);
204 }208 }